public abstract class AbstractIterator<E>
extends java.lang.Object
implements java.util.Iterator<E>
getNext() method to implement it.
This iterator works on the premise that a null value returned from getNext() means
that this iterator is complete.
Note this iterator does not implement Iterator.remove() and is up to implementors to do so.| Constructor and Description |
|---|
AbstractIterator() |
| Modifier and Type | Method and Description |
|---|---|
void |
forEachRemaining(java.util.function.Consumer<? super E> action) |
protected abstract E |
getNext()
Method to implement to provide an iterator implementation.
|
boolean |
hasNext() |
E |
next() |
protected abstract E getNext()
public boolean hasNext()
hasNext in interface java.util.Iterator<E>