E
- The type of element on which this cursor will iteratepublic abstract class AbstractCursor<E> extends Object implements Cursor<E>
Constructor and Description |
---|
AbstractCursor() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkNotClosed(String operation)
Check that the cursor is not closed before executing an operation.
|
void |
close()
Closes this Cursor and frees any resources it my have allocated.
|
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.
|
public AbstractCursor()
public final void setClosureMonitor(ClosureMonitor monitor)
setClosureMonitor
in interface Cursor<E>
monitor
- the monitor to use for detecting Cursor close eventsprotected final void checkNotClosed(String operation) throws Exception
operation
- The operation we try to executeException
- If there is a problem during the checkpublic final boolean isClosed()
public void close(Exception cause) throws Exception
public void close() throws Exception
public boolean isAfterLast() throws Exception
isAfterLast
in interface Cursor<E>
Exception
- if there are problems querying the position of this Cursor
or if this Cursor is closedpublic boolean isBeforeFirst() throws Exception
isBeforeFirst
in interface Cursor<E>
Exception
- if there are problems querying the position of this Cursor
or if this Cursor is closedCopyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.