E - The type of element on which this cursor will iteratepublic abstract class AbstractCursor<E> extends Object implements Cursor<E>
| Modifier and Type | Field and Description |
|---|---|
private ClosureMonitor |
monitor
The default associated monitor
|
| Constructor and Description |
|---|
AbstractCursor() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkNotClosed()
Check that the cursor is not closed before executing an operation.
|
void |
close() |
void |
close(Exception cause)
Closes this Cursor and frees any resources it my have allocated.
|
boolean |
isAfterLast()
Is this Cursor positioned after the last element.
|
boolean |
isBeforeFirst()
Is this Cursor positioned before the first element.
|
boolean |
isClosed()
Checks if this Cursor is closed.
|
boolean |
isFirst()
Is this Cursor positioned at the first element.
|
boolean |
isLast()
Is this Cursor positioned at the last element.
|
Iterator<E> |
iterator() |
void |
setClosureMonitor(ClosureMonitor monitor)
Sets a non-null closure monitor to associate with this Cursor.
|
String |
toString(String tabs)
Pretty-print a cursor and its wrapped cursor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafter, afterLast, available, before, beforeFirst, first, get, last, next, previousforEach, spliteratorprivate ClosureMonitor monitor
public void setClosureMonitor(ClosureMonitor monitor)
setClosureMonitor in interface Cursor<E>monitor - the monitor to use for detecting Cursor close eventspublic final void checkNotClosed()
throws CursorClosedException
CursorClosedException - If there is a problem during the checkpublic boolean isClosed()
public void close(Exception cause) throws IOException
close in interface Cursor<E>cause - exception thrown when this Cursor is accessed after closeIOException - If we can't close the Cursorpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean isAfterLast()
isAfterLast in interface Cursor<E>public boolean isBeforeFirst()
isBeforeFirst in interface Cursor<E>public boolean isFirst()
public boolean isLast()
Copyright © 2003–2022 The Apache Software Foundation. All rights reserved.