public abstract class AbstractCloseableIterator<E> extends Object implements Iterator<E>, Closeable
| Constructor and Description |
|---|
AbstractCloseableIterator() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Calls
handleClose() upon first call and makes sure this method gets called only once. |
protected void |
handleAlreadyClosed() |
protected void |
handleClose()
Called by
close() when it is called for the first time. |
boolean |
isClosed()
Checks whether this Iterator has been closed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, hasNext, next, removepublic final boolean isClosed()
public final void close()
throws IOException
handleClose() upon first call and makes sure this method gets called only once.close in interface Closeableclose in interface AutoCloseableIOExceptionprotected void handleClose()
throws IOException
close() when it is called for the first time. This method is only called once on each iteration.
By default, this method does nothing.XIOExceptionprotected void handleAlreadyClosed()
throws IOException
IOExceptionCopyright © 2015-2021 Eclipse Foundation. All Rights Reserved.