public class DefaultVirtualObjectEntryEnumeration extends BaseDefaultVirtualEnumeration implements VirtualObjectEntryEnumeration
This implementation is not virtual, and is intended to be used when the number of elements in the list is small.
The elements will be returned from this enumeration in the same order that they are enumerated out of the Enumeration passed to the constructor.
VirtualObjectEntryEnumerationm_enumerationData, m_iEnumerationIndex, m_shellVENUMPOS_AFTERENUM, VENUMPOS_BEFOREENUM, VENUMPOS_FIRSTENTRYAPPROXIMATECOUNT, BASECOUNT, EXACTCOUNT, PARTIALCOUNT, UNKNOWNCOUNT| Constructor and Description |
|---|
DefaultVirtualObjectEntryEnumeration(ObjectEntryEnumeration oee,
Shell shell)
Constructs the DefaultVirtualObjectEntryEnumeration.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCount()
Get the approximate total enumeration entry count.
|
int |
getCurrentPosition()
Returns the current enumeration cursor position.
|
int |
getLastEntryPosition()
Returns the enumeration cursor position for the last entry in the enumeration.
|
ObjectEntry[] |
getNext(int iCount)
Returns the next count entries in the enumeration.
|
ObjectEntry[] |
getPrev(int iCount)
Returns the previous count entries in the enumeration.
|
boolean |
hasMoreElements()
Determine if this enumeration has more elements based on the current list
cursor position.
|
int |
moveFirst()
Moves the enumeration cursor to the first entry in the enumeration.
|
int |
moveLast()
Moves the enumeration cursor to the last entry in the enumeration.
|
int |
moveLeft(int iCount)
Moves the enumeration cursor position toward the left in the enumeration.
|
int |
moveRight(int iCount)
Moves the enumeration cursor position toward the right in the enumeration.
|
int |
moveTo(int iPercent)
Moves the enumeration cursor position to the entry associated
with the position specified in the enumeration.
|
int |
moveTo(java.lang.String target)
Moves the enumeration cursor position to the entry that most
matches the specified target name.
|
ObjectEntry |
next()
Get the next ObjectEntry element from the enumeration.
|
java.lang.Object |
nextElement()
Get the next Object element from the enumeration.
|
ObjectEntry |
previous()
Returns the previous entry in the enumeration and moves the enumeration cursor
to the previous entry.
|
findEntry, getCountReliability, getDisplayNameForObject, refresh, setBlockSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrefresh, setBlockSizepublic DefaultVirtualObjectEntryEnumeration(ObjectEntryEnumeration oee, Shell shell)
oee - The ObjectEntryEnumeration used to populate this enumeration.shell - The instance of the Shell that will be used to get object names.public boolean hasMoreElements()
The determination is made based on having more elements to return from the nextElement() method.
hasMoreElements in interface java.util.Enumerationpublic java.lang.Object nextElement()
nextElement in interface java.util.Enumerationpublic ObjectEntry next()
next in interface ObjectEntryEnumerationpublic ObjectEntry previous()
previous in interface BrowserObjectEntryEnumerationpublic int moveFirst()
moveFirst in interface BrowserObjectEntryEnumerationpublic int moveLast()
moveLast in interface BrowserObjectEntryEnumerationpublic int moveTo(int iPercent)
The parameter iPercent and the returned enumeration cursor position is an approximate position in the enumeration as described in the comments for getCurrentPosition().
moveTo in interface VirtualObjectEntryEnumerationiPercent - The desired position in the enumeration.getCurrentPosition()public int moveTo(java.lang.String target)
If an exact match is not found, then the enumeration cursor position is moved to the entry which matches the target name the closest.
moveTo in interface BrowserObjectEntryEnumerationtarget - The name of the entry to which the enumeration cursor position will be moved.public ObjectEntry[] getNext(int iCount)
Get the number entries toward the right (end) of the enumeration, as indicated in the count, and move the current enumeration cursor position toward the right of the enumeration.
Moves as per the movement rules as defined in the VirtiualObjectEntryEnumeration interface.
getNext in interface VirtualObjectEntryEnumerationiCount - The count of next entries to be returnedpublic ObjectEntry[] getPrev(int iCount)
Get the number entries toward the left (start) of the enumeration, as indicated in the count, and move the current enumeration cursor position toward the left of the enumeration.
Moves as per the movement rules as defined in the VirtiualObjectEntryEnumeration interface.
getPrev in interface VirtualObjectEntryEnumerationiCount - The count of previous entries to be returnedpublic int moveLeft(int iCount)
Moves the cursor toward the left (start) of the enumeration according to the count specified.
Moves as per the movement rules as defined in the VirtiualObjectEntryEnumeration interface.
moveLeft in interface VirtualObjectEntryEnumerationiCount - The count of entries to move.public int moveRight(int iCount)
Moves the cursor toward the right (end) of the enumeration according to the count specified.
Moves as per the movement rules as defined in the VirtiualObjectEntryEnumeration interface.
moveRight in interface VirtualObjectEntryEnumerationiCount - The count of entries to move.public int getCurrentPosition()
The enumeration cursor position is defined as one of the following:
Given that LASTENTRYPOS is the value returned from the method getLastEntryPosition().
Position values between VENUMPOS_FIRSTENTRY and LASTENTRYPOS indicate a relative approximate position in the enumeration.
getCurrentPosition in interface VirtualObjectEntryEnumerationpublic int getLastEntryPosition()
Defines the cursor position for the last entry for this implementation of VirtualObjectEntryEnumeration.
getLastEntryPosition in interface VirtualObjectEntryEnumerationpublic int getCount()
getCount in interface CountableObjectEntryEnumerationgetCount in interface VirtualObjectEntryEnumerationgetCount in class BaseDefaultVirtualEnumeration
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.