org.apache.directory.server.xdbm
Class SingletonIndexCursor<K,E,ID>

java.lang.Object
  extended by org.apache.directory.server.xdbm.AbstractIndexCursor<K,E,ID>
      extended by org.apache.directory.server.xdbm.SingletonIndexCursor<K,E,ID>
All Implemented Interfaces:
java.lang.Iterable<IndexEntry<K,E,ID>>, IndexCursor<K,E,ID>, org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,E,ID>>

public class SingletonIndexCursor<K,E,ID>
extends AbstractIndexCursor<K,E,ID>

A Cursor over a single element.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
SingletonIndexCursor(IndexEntry<K,E,ID> singleton)
           
 
Method Summary
 void after(IndexEntry<K,E,ID> element)
           
 void afterLast()
           
 void afterValue(ID id, K value)
          An alternative to calling after(IndexEntry) which often may require wrapping an id and value in a newly created IndexEntry object that may be an unnecessary object creation.
 boolean available()
           
 void before(IndexEntry<K,E,ID> element)
           
 void beforeFirst()
           
 void beforeValue(ID id, K value)
          An alternative to calling before(IndexEntry) which often may require wrapping an id and value in a newly created IndexEntry object that may be an unnecessary object creation.
 boolean first()
           
 IndexEntry<K,E,ID> get()
           
 boolean isAfterLast()
           
 boolean isBeforeFirst()
           
 boolean isElementReused()
           
 boolean isFirst()
           
 boolean isLast()
           
 boolean last()
           
 boolean next()
           
 boolean previous()
           
 
Methods inherited from class org.apache.directory.server.xdbm.AbstractIndexCursor
checkNotClosed, close, close, isClosed, iterator, setClosureMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonIndexCursor

public SingletonIndexCursor(IndexEntry<K,E,ID> singleton)
Method Detail

available

public boolean available()

before

public void before(IndexEntry<K,E,ID> element)
            throws java.lang.Exception
Throws:
java.lang.Exception

beforeValue

public void beforeValue(ID id,
                        K value)
                 throws java.lang.Exception
Description copied from interface: IndexCursor
An alternative to calling before(IndexEntry) which often may require wrapping an id and value in a newly created IndexEntry object that may be an unnecessary object creation. Some implementations may not support this operation and may throw an UnsupportedOperationEception.

Parameters:
id - the id for the entry
value - the value to advance just before
Throws:
java.lang.Exception - if there are faults performing this operation

afterValue

public void afterValue(ID id,
                       K value)
                throws java.lang.Exception
Description copied from interface: IndexCursor
An alternative to calling after(IndexEntry) which often may require wrapping an id and value in a newly created IndexEntry object that may be an unnecessary object creation. Some implementations may not support this operation and may throw an UnsupportedOperationEception.

Parameters:
id - the id for the entry
value - the value to advance just after the last value
Throws:
java.lang.Exception - if there are faults performing this operation

after

public void after(IndexEntry<K,E,ID> element)
           throws java.lang.Exception
Throws:
java.lang.Exception

beforeFirst

public void beforeFirst()
                 throws java.lang.Exception
Throws:
java.lang.Exception

afterLast

public void afterLast()
               throws java.lang.Exception
Throws:
java.lang.Exception

first

public boolean first()
              throws java.lang.Exception
Throws:
java.lang.Exception

last

public boolean last()
             throws java.lang.Exception
Throws:
java.lang.Exception

isFirst

public boolean isFirst()
                throws java.lang.Exception
Throws:
java.lang.Exception

isLast

public boolean isLast()
               throws java.lang.Exception
Throws:
java.lang.Exception

isAfterLast

public boolean isAfterLast()
                    throws java.lang.Exception
Throws:
java.lang.Exception

isBeforeFirst

public boolean isBeforeFirst()
                      throws java.lang.Exception
Throws:
java.lang.Exception

previous

public boolean previous()
                 throws java.lang.Exception
Throws:
java.lang.Exception

next

public boolean next()
             throws java.lang.Exception
Throws:
java.lang.Exception

get

public IndexEntry<K,E,ID> get()
                       throws java.lang.Exception
Throws:
java.lang.Exception

isElementReused

public boolean isElementReused()


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.