Class AbstractIterator<T>
java.lang.Object
manifold.rt.api.util.AbstractIterator<T>
- All Implemented Interfaces:
Iterator<T>
-
Constructor Details
-
AbstractIterator
public AbstractIterator()
-
-
Method Details
-
computeNext
protected abstract void computeNext()Computes the next item in the iterator.This callback method should call one of these two methods:
* [setNext] with the next value of the iteration * [done] to indicate there are no more elements
Failure to call either method will result in the iteration terminating with a failed state
-
hasNext
-
next
-
setNext
Sets the next value in the iteration, called from the [computeNext] function -
done
protected void done()Sets the state to done so that the iteration terminates.
-