|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.model.cursor.AbstractCursor<E>
E - The type of element on which this cursor will iteratepublic abstract class AbstractCursor<E>
Simple class that contains often used Cursor code.
| Constructor Summary | |
|---|---|
AbstractCursor()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.directory.shared.ldap.model.cursor.Cursor |
|---|
after, afterLast, available, before, beforeFirst, first, get, last, next, previous |
| Constructor Detail |
|---|
public AbstractCursor()
| Method Detail |
|---|
public final void setClosureMonitor(ClosureMonitor monitor)
setClosureMonitor in interface Cursor<E>monitor - the monitor to use for detecting Cursor close events
public final void checkNotClosed(String operation)
throws Exception
operation - The operation we try to execute
Exception - If there is a problem during the checkpublic final boolean isClosed()
isClosed in interface Cursor<E>
public void close(Exception cause)
throws Exception
close in interface Cursor<E>cause - exception thrown when this Cursor is accessed after close
Exception - if for some reason this Cursor could not be closed
public void close()
throws Exception
close in interface Cursor<E>Exception - if for some reason this Cursor could not be closedpublic Iterator<E> iterator()
iterator in interface Iterable<E>
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 closed
public 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 closed
public boolean isFirst()
throws Exception
isFirst in interface Cursor<E>Exception - if there are problems querying the position of this Cursor
or if this Cursor is closed
public boolean isLast()
throws Exception
isLast in interface Cursor<E>Exception - if there are problems querying the position of this Cursor
or if this Cursor is closed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||