public static class CellRevisionProviderDefault.ImmutableNodeInstIterable extends java.lang.Object implements ImmutableNodeInst.Iterable
Modifier and Type | Method and Description |
---|---|
void |
check()
Checks invariant of this CellRevision.
|
ImmutableNodeInst |
get(int index)
Returns the ImmutableNodeInst at the specified position in this list.
|
int |
getMaxNodeId()
Returns maximum nodeId used by nodes of this CellReversion.
|
ImmutableNodeInst |
getNodeById(int nodeId)
Returns ImmutableNodeInst by its nodeId.
|
int |
getNodeIndexByNodeId(int nodeId)
Returns sort order index of ImmutableNodeInst by its nodeId.
|
boolean |
hasNodeWithId(int nodeId)
Returns true an ImmutableNodeInst with specified nodeId is contained in
this CellRevision.
|
boolean |
isEmpty()
Returns true if this list contains no ImmutableNodeInsts.
|
java.util.Iterator<ImmutableNodeInst> |
iterator() |
int |
searchByName(java.lang.String name)
Searches the nodes for the specified name using the binary search
algorithm.
|
int |
size()
Returns the number of ImmutableNodeInsts in this list.
|
public boolean isEmpty()
isEmpty
in interface ImmutableNodeInst.Iterable
public int size()
size
in interface ImmutableNodeInst.Iterable
public ImmutableNodeInst get(int index)
get
in interface ImmutableNodeInst.Iterable
index
- index of the element to returnjava.lang.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())public java.util.Iterator<ImmutableNodeInst> iterator()
iterator
in interface ImmutableNodeInst.Iterable
iterator
in interface java.lang.Iterable<ImmutableNodeInst>
public int searchByName(java.lang.String name)
searchByName
in interface ImmutableNodeInst.Iterable
name
- the name to be searched.public ImmutableNodeInst getNodeById(int nodeId)
getNodeById
in interface ImmutableNodeInst.Iterable
nodeId
- of ImmutableNodeInst.java.lang.IndexOutOfBoundsException
- if nodeId is negativepublic int getNodeIndexByNodeId(int nodeId)
getNodeIndexByNodeId
in interface ImmutableNodeInst.Iterable
nodeId
- of ImmutableNodeInst.public boolean hasNodeWithId(int nodeId)
hasNodeWithId
in interface ImmutableNodeInst.Iterable
nodeId
- specified nodeId.java.lang.IllegalArgumentException
- if nodeId is negativepublic int getMaxNodeId()
getMaxNodeId
in interface ImmutableNodeInst.Iterable
public void check()
check
in interface ImmutableNodeInst.Iterable
java.lang.AssertionError
- if invariant is broken.