public class ArrayTreeCursor<E>
extends org.apache.directory.api.ldap.model.cursor.AbstractCursor<E>
| Modifier and Type | Field and Description |
|---|---|
private ArrayTree<E> |
array
The underlying ArrayTree
|
private int |
current
The current position/index in the array
|
private static boolean |
IS_DEBUG
Speedup for logs
|
private static org.slf4j.Logger |
LOG_CURSOR
A dedicated log for cursors
|
private Position |
position
The current position of this cursor, relative to the node
|
| Constructor and Description |
|---|
ArrayTreeCursor(ArrayTree<E> array)
Create a cursor on an ArrayTree
|
| Modifier and Type | Method and Description |
|---|---|
void |
after(E element) |
void |
afterLast() |
boolean |
available() |
void |
before(E element) |
void |
beforeFirst() |
void |
close() |
void |
close(java.lang.Exception reason) |
boolean |
first() |
E |
get() |
boolean |
last() |
boolean |
next() |
boolean |
previous() |
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.String tabs) |
checkNotClosed, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, iterator, setClosureMonitorprivate static final org.slf4j.Logger LOG_CURSOR
private static final boolean IS_DEBUG
private int current
private Position position
public void after(E element) throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic void afterLast()
throws org.apache.directory.api.ldap.model.exception.LdapException,
org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic boolean available()
public void before(E element) throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic void beforeFirst()
throws org.apache.directory.api.ldap.model.exception.LdapException,
org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic boolean first()
throws org.apache.directory.api.ldap.model.exception.LdapException,
org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic E get() throws org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.cursor.CursorExceptionpublic boolean last()
throws org.apache.directory.api.ldap.model.exception.LdapException,
org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic boolean next()
throws org.apache.directory.api.ldap.model.exception.LdapException,
org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic boolean previous()
throws org.apache.directory.api.ldap.model.exception.LdapException,
org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic void close()
public void close(java.lang.Exception reason)
public java.lang.String toString(java.lang.String tabs)
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()