T - the type of elements returned by this iteratorpublic abstract class CloseableIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>
isClosed() returns true.
If the iterator has been closed before calling hasNext() then the method returns false.
If the iterator was closed after hasNext returns true but before next(), the
method next() throws NoSuchElementException.
The method remove() throws IllegalStateException if the iterator has been closed.| Modifier and Type | Field and Description |
|---|---|
private java.lang.Boolean |
finishCurrentIteration |
| Constructor and Description |
|---|
CloseableIterator() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
doHasNext() |
protected abstract T |
doNext() |
protected abstract void |
doRemove() |
boolean |
hasNext() |
protected abstract boolean |
isClosed() |
T |
next() |
private boolean |
popMarker() |
void |
remove() |
protected abstract boolean isClosed()
protected abstract boolean doHasNext()
protected abstract T doNext()
protected abstract void doRemove()
public boolean hasNext()
hasNext in interface java.util.Iterator<T>public void remove()
remove in interface java.util.Iterator<T>private boolean popMarker()
true if marker changed from NULL to anything