com.novell.application.console.snapin
Interface IndexedObjectEntryEnumeration

All Superinterfaces:
BrowserObjectEntryEnumeration, java.util.Enumeration, ObjectEntryEnumeration
All Known Implementing Classes:
DefaultIndexedObjectEntryEnumeration

public interface IndexedObjectEntryEnumeration
extends BrowserObjectEntryEnumeration

Provides an indexed ObjectEntry enumeration.

An indexed ObjectEntry enumeration may be implemented to provide virtual access to ObjectEntries returned from a namespace. The implementation of the enumeration must support absolute indexes of ObjectEntries and an absolute total count of ObjectEntries in the enumeration.

See Also:
DefaultIndexedObjectEntryEnumeration

Method Summary
 int getCount()
          Returns the total enumeration entry count in the enumeration.
 ObjectEntry[] getNext(int count)
          Returns the next entries in the enumeration, as indicated by the count.
 ObjectEntry[] getPrev(int count)
          Returns the previous entries in the enumeration, as indicated by the count.
 int moveTo(int index)
          Moves the enumeration cursor to the entry associated with the specified index in the enumeration.
 
Methods inherited from interface com.novell.application.console.snapin.BrowserObjectEntryEnumeration
moveFirst, moveLast, moveTo, previous, refresh, setBlockSize
 
Methods inherited from interface com.novell.application.console.snapin.ObjectEntryEnumeration
next
 
Methods inherited from interface java.util.Enumeration
hasMoreElements, nextElement
 

Method Detail

moveTo

public int moveTo(int index)
           throws SnapinException
Moves the enumeration cursor to the entry associated with the specified index in the enumeration.
Parameters:
index - The index of the entry to move the cursor to.
Returns:
The new enumeration cursor index.
Throws:
SnapinException - Thrown by the service provider when an error occurs.

getNext

public ObjectEntry[] getNext(int count)
                      throws SnapinException
Returns the next entries in the enumeration, as indicated by the count.

Returns the next entries indicated by the count, beginning with the entry to which the enumeration cursor points. After the call the enumeration cursor stays at the entry following the last returned entry. If the end of the enumeration is reached, the enumeration cursor stays past the last entry in the enumeration. In this state, additional getNext() calls will return a new ObjectEntry[0].

If the enumeration cursor stays before the start of the enumeration, getNext() returns the first count entries in the enumeration and the enumeration cursor stays at the entry following the last returned entry.

If the end of the enumeration is reached before the count entries, a new ObjectEntry[partial count] is returned, and no exception is generated. Do not return a new ObjectEntry[count] with nulls padding the "unavailable" entries.

Parameters:
count - The count of next entries to be returned
Returns:
The next object entries.
Throws:
SnapinException - Thrown by the service provider when an error occurs.

getPrev

public ObjectEntry[] getPrev(int count)
                      throws SnapinException
Returns the previous entries in the enumeration, as indicated by the count.

Returns the previous entries indicated by the count, beginning with the entry next to the entry to which the enumeration cursor points. After the call the enumeration cursor stays at the last returned entry. If the start of the enumeration is passed, the enumeration cursor stays before the first entry in the enumeration. In this state, additional getPrev() calls will return a new ObjectEntry[0].

If the enumeration cursor stays past the end of the enumeration, then getPrev() returns the last entries, indicated by the count, in the enumeration. The enumeration cursor stays at the returned entry farthest from the end of the enumeration.

If the start of the enumeration is encountered before the count of entries, an new ObjectEntry[partial count] is returned, and no exception is generated. Do not return a new ObjectEntry[count] with nulls padding the "unavailable" entries.

The entries are returned in the order they appear in the enumeration. They are not reversed.

Parameters:
count - The count of previous entries to be returned
Returns:
The previous object entries.
Throws:
SnapinException - Thrown by the service provider when an error occurs.

getCount

public int getCount()
             throws SnapinException
Returns the total enumeration entry count in the enumeration.
Returns:
The total enumeration entry count.
Throws:
SnapinException - Thrown by the service provider when an error occurs.


API Documentation Copyright © 1998-2003 Novell, Inc. All rights reserved.
ConsoleOne is a registered trademark of Novell Inc.
Generated December 9 2003 1727.