public abstract class ArcLabelledNodeIterator extends NodeIterator
The purpose of this abstract implementation is to override covariantly
the return type of of
NodeIterator.successors(), so that
it has to be a
ArcLabelledNodeIterator.LabelledArcIterator, and provide a general
implementation of a new
labelArray() method that returns
the labels of the arcs going out of the current node as an array.
|Modifier and Type||Class and Description|
An iterator returning successor and the labels of the arcs toward them.
|Constructor and Description|
|Modifier and Type||Method and Description|
Creates a copy of this iterator that will never return nodes ≥ the specified bound; the copy must be accessible by a different thread.
Returns a reference to an array containing the labels of the arcs going out of the current node in the same order as the order in which the corresponding successors are returned by
Returns a lazy iterator over the successors of the current node.
Returns a new array of labels filled with exactly
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, next, nextInt, skip
public abstract ArcLabelledNodeIterator.LabelledArcIterator successors()
This implementation just wraps the array returned by
public Label labelArray()
The returned array may contain more entries than the outdegree of the current node. However, only those with indices from 0 (inclusive) to the outdegree of the current node (exclusive) contain valid data.
This implementation just unwrap the iterator returned by
writes in a newly allocated array copies of the labels returned by
protected static Label unwrap(ArcLabelledNodeIterator.LabelledArcIterator iterator, int howMany)
howManylabels from the given iterator. Note that the iterator is required to have at least as many labels as needed.
iterator- the iterator.
howMany- the number of labels.
public ArcLabelledNodeIterator copy(int upperBound)
This implementation just throws an
UnsupportedOperationException. It should be kept
in sync with the result of