E
- The type of element on which this cursor will iteratepublic interface Cursor<E> extends Iterable<E>, Closeable
Modifier and Type | Method and Description |
---|---|
void |
after(E element)
Prepares this Cursor, so a subsequent call to Cursor#previous() with a
true return value, will have positioned the Cursor on a dataSet element
equal to or less than the element argument but not greater.
|
void |
afterLast()
Positions this Cursor after the last element.
|
boolean |
available()
Determines whether or not a call to get() will succeed.
|
void |
before(E element)
Prepares this Cursor, so a subsequent call to Cursor#next() with a
true return value, will have positioned the Cursor on a dataSet
element equal to or less than the element argument but not greater.
|
void |
beforeFirst()
Positions this Cursor before the first element.
|
void |
close(Exception reason)
Closes this Cursor and frees any resources it my have allocated.
|
boolean |
first()
Positions this Cursor at the first element.
|
E |
get()
Gets the object at the current position.
|
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.
|
boolean |
last()
Positions this Cursor at the last element.
|
boolean |
next()
Advances this Cursor to the next position.
|
boolean |
previous()
Advances this Cursor to the previous position.
|
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.
|
forEach, iterator, spliterator
boolean available()
void before(E element) throws LdapException, CursorException
element
- the element to be positioned beforeLdapException
- if we have get any LDAP exception while operating
the cursorCursorException
- if there are problems advancing to this Cursor before
the given element, or if this Cursor is closedvoid after(E element) throws LdapException, CursorException
element
- the element to be positioned afterLdapException
- if we have get any LDAP exception while operating
the cursorCursorException
- if there are problems advancing to this Cursor after
the given element, or if this Cursor is closedvoid beforeFirst() throws LdapException, CursorException
LdapException
- if we have get any LDAP exception while operating
the cursorCursorException
- if there are problems advancing to this Cursor before
the first position, or if this Cursor is closedvoid afterLast() throws LdapException, CursorException
LdapException
- if we have get any LDAP exception while operating
the cursorCursorException
- if there are problems advancing to this Cursor after
the last position, or if this Cursor is closedboolean first() throws LdapException, CursorException
LdapException
- if we have get any LDAP exception while operating
the cursorCursorException
- if there are problems advancing to this Cursor to
the first position, or if this Cursor is closedboolean isFirst()
boolean isBeforeFirst()
boolean last() throws LdapException, CursorException
LdapException
- if we have get any LDAP exception while operating
the cursorCursorException
- if there are problems advancing to this Cursor to
the last position, or if this Cursor is closedboolean isLast()
boolean isAfterLast()
boolean isClosed()
boolean previous() throws LdapException, CursorException
LdapException
- if we have get any LDAP exception while operating
the cursorCursorException
- if there are problems advancing to this Cursor to
the previous position, or if this Cursor is closedboolean next() throws LdapException, CursorException
LdapException
- if we have get any LDAP exception while operating
the cursorCursorException
- if there are problems advancing to this Cursor to
the next position, or if this Cursor is closedE get() throws CursorException
CursorException
- if the object at this Cursor's current position
cannot be retrieved, or if this Cursor is closedvoid close(Exception reason) throws IOException
reason
- exception thrown when this Cursor is accessed after closeIOException
- If we can't close the Cursorvoid setClosureMonitor(ClosureMonitor monitor)
monitor
- the monitor to use for detecting Cursor close eventsCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.