public abstract class LookAheadIterator<E> extends AbstractCloseableIterator<E>
Modifier | Constructor and Description |
---|---|
protected |
LookAheadIterator() |
Modifier and Type | Method and Description |
---|---|
protected abstract E |
getNextElement()
Gets the next element.
|
protected void |
handleAlreadyClosed() |
protected void |
handleClose()
Called by
AbstractCloseableIterator.close() when it is called for the first time. |
boolean |
hasNext() |
E |
next() |
void |
remove()
Throws an
UnsupportedOperationException . |
close, isClosed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
protected abstract E getNextElement()
public final boolean hasNext()
public final E next()
public void remove()
UnsupportedOperationException
.protected void handleClose() throws IOException
AbstractCloseableIterator
AbstractCloseableIterator.close()
when it is called for the first time. This method is only called once on each iteration.
By default, this method does nothing.handleClose
in class AbstractCloseableIterator<E>
IOException
protected void handleAlreadyClosed() throws IOException
handleAlreadyClosed
in class AbstractCloseableIterator<E>
IOException
Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.