public interface OrdinalIterator
OrdinalIterator is the interface used to iterate over a set of connections.
An OrdinalIterator may be obtained for a set of connections directly from an NFGraph or via an OrdinalSet
obtained from an NFGraph.
| Modifier and Type | Field and Description |
|---|---|
static OrdinalIterator |
EMPTY_ITERATOR
An iterator which always return
OrdinalIterator.NO_MORE_ORDINALS |
static int |
NO_MORE_ORDINALS
This value will be returned from
nextOrdinal() after the iteration is completed. |
| Modifier and Type | Method and Description |
|---|---|
OrdinalIterator |
copy()
Obtain a copy of this
OrdinalIterator. |
boolean |
isOrdered() |
int |
nextOrdinal() |
void |
reset()
Rewinds this
OrdinalIterator to the beginning of the set. |
static final int NO_MORE_ORDINALS
nextOrdinal() after the iteration is completed.static final OrdinalIterator EMPTY_ITERATOR
OrdinalIterator.NO_MORE_ORDINALSint nextOrdinal()
void reset()
OrdinalIterator to the beginning of the set.OrdinalIterator copy()
OrdinalIterator. The returned OrdinalIterator will be reset to the beginning of the set.boolean isOrdered()
true if the ordinals returned from this set are guaranteed to be in ascending order. Returns false otherwise.