|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
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 |
public int moveTo(int index) throws SnapinException
index
- The index of the entry to move the cursor to.public ObjectEntry[] getNext(int count) throws SnapinException
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.
count
- The count of next entries to be returnedpublic ObjectEntry[] getPrev(int count) throws SnapinException
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.
count
- The count of previous entries to be returnedpublic int getCount() throws SnapinException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |