public static interface ImmutableNodeInst.Iterable extends java.lang.Iterable<ImmutableNodeInst>
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.
|
boolean isEmpty()
int size()
ImmutableNodeInst get(int index)
index
- index of the element to returnjava.lang.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())java.util.Iterator<ImmutableNodeInst> iterator()
iterator
in interface java.lang.Iterable<ImmutableNodeInst>
int searchByName(java.lang.String name)
name
- the name to be searched.ImmutableNodeInst getNodeById(int nodeId)
nodeId
- of ImmutableNodeInst.java.lang.IndexOutOfBoundsException
- if nodeId is negativeint getNodeIndexByNodeId(int nodeId)
nodeId
- of ImmutableNodeInst.boolean hasNodeWithId(int nodeId)
nodeId
- specified nodeId.java.lang.IllegalArgumentException
- if nodeId is negativeint getMaxNodeId()
void check()
java.lang.AssertionError
- if invariant is broken.