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

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

public class SingletonIndexCursor<V,ID>
extends AbstractIndexCursor<V,org.apache.directory.shared.ldap.model.entry.Entry,ID>

A Cursor over a single element.

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.server.xdbm.AbstractIndexCursor
UNSUPPORTED_MSG
 
Constructor Summary
SingletonIndexCursor(IndexEntry<V,ID> singleton)
           
 
Method Summary
 void afterLast()
           
 boolean available()
          
 void beforeFirst()
           
 boolean first()
           
 IndexEntry<V,ID> get()
           
protected  String getUnsupportedMessage()
          Gets the message to return for operations that are not supported
 boolean isAfterLast()
          
 boolean isBeforeFirst()
          
 boolean isFirst()
          
 boolean isLast()
          
 boolean last()
           
 boolean next()
           
 boolean previous()
           
 
Methods inherited from class org.apache.directory.server.xdbm.AbstractIndexCursor
after, afterValue, before, beforeValue, iterator, setAvailable
 
Methods inherited from class org.apache.directory.shared.ldap.model.cursor.AbstractCursor
checkNotClosed, close, close, isClosed, setClosureMonitor
 
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
close, close, isClosed, setClosureMonitor
 

Constructor Detail

SingletonIndexCursor

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

getUnsupportedMessage

protected String getUnsupportedMessage()
Gets the message to return for operations that are not supported

Specified by:
getUnsupportedMessage in class AbstractIndexCursor<V,org.apache.directory.shared.ldap.model.entry.Entry,ID>
Returns:
The Unsupported message

available

public boolean available()
Description copied from class: AbstractIndexCursor

Specified by:
available in interface org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<V,ID>>
Overrides:
available in class AbstractIndexCursor<V,org.apache.directory.shared.ldap.model.entry.Entry,ID>

beforeFirst

public void beforeFirst()
                 throws Exception
Throws:
Exception

afterLast

public void afterLast()
               throws Exception
Throws:
Exception

first

public boolean first()
              throws Exception
Throws:
Exception

last

public boolean last()
             throws Exception
Throws:
Exception

isFirst

public boolean isFirst()
                throws Exception
Description copied from class: AbstractIndexCursor

Specified by:
isFirst in interface org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<V,ID>>
Overrides:
isFirst in class AbstractIndexCursor<V,org.apache.directory.shared.ldap.model.entry.Entry,ID>
Throws:
Exception

isLast

public boolean isLast()
               throws Exception
Description copied from class: AbstractIndexCursor

Specified by:
isLast in interface org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<V,ID>>
Overrides:
isLast in class AbstractIndexCursor<V,org.apache.directory.shared.ldap.model.entry.Entry,ID>
Throws:
Exception

isAfterLast

public boolean isAfterLast()
                    throws Exception
Description copied from class: AbstractIndexCursor

Specified by:
isAfterLast in interface org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<V,ID>>
Overrides:
isAfterLast in class AbstractIndexCursor<V,org.apache.directory.shared.ldap.model.entry.Entry,ID>
Throws:
Exception

isBeforeFirst

public boolean isBeforeFirst()
                      throws Exception
Description copied from class: AbstractIndexCursor

Specified by:
isBeforeFirst in interface org.apache.directory.shared.ldap.model.cursor.Cursor<IndexEntry<V,ID>>
Overrides:
isBeforeFirst in class AbstractIndexCursor<V,org.apache.directory.shared.ldap.model.entry.Entry,ID>
Throws:
Exception

previous

public boolean previous()
                 throws Exception
Throws:
Exception

next

public boolean next()
             throws Exception
Throws:
Exception

get

public IndexEntry<V,ID> get()
                     throws Exception
Throws:
Exception


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.