public abstract class AbstractCloseableIteration<E,X extends Exception> extends Object implements CloseableIteration<E,X>
CloseableIterations offering common functionality. This class keeps track of whether the
iteration has been closed and handles multiple calls to close() by ignoring all but the first call.| Constructor and Description |
|---|
AbstractCloseableIteration() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Calls
handleClose() upon first call and makes sure the resource closures are only executed once. |
protected void |
handleClose()
Called by
close() when it is called for the first time. |
boolean |
isClosed()
Checks whether this CloseableIteration has been closed.
|
public final boolean isClosed()
public final void close()
throws X extends Exception
handleClose() upon first call and makes sure the resource closures are only executed once.close in interface AutoCloseableclose in interface CloseableIteration<E,X extends Exception>X extends ExceptionCopyright © 2015-2020 Eclipse Foundation. All Rights Reserved.