com.novell.application.console.snapin
Class DefaultObjectEntryEnumeration

java.lang.Object
  extended bycom.novell.application.console.snapin.DefaultObjectEntryEnumeration
All Implemented Interfaces:
CountableObjectEntryEnumeration, java.util.Enumeration, ObjectEntryEnumeration

public class DefaultObjectEntryEnumeration
extends java.lang.Object
implements ObjectEntryEnumeration, CountableObjectEntryEnumeration

Converts an array, vector or enumeration of ObjectEntrys to an ObjectEntryEnumeration that can be returned from the getChildren() and getChildContainer() methods of the NamespaceSnapin interface.

This class is a convenience helper class in creating ObjectEntryEnumerations.

See Also:
ObjectEntryEnumeration

Field Summary
 
Fields inherited from interface com.novell.application.console.snapin.CountableObjectEntryEnumeration
APPROXIMATECOUNT, BASECOUNT, EXACTCOUNT, PARTIALCOUNT, UNKNOWNCOUNT
 
Constructor Summary
DefaultObjectEntryEnumeration()
          Creates an empty DefaultObjectEntryEnumeration.
DefaultObjectEntryEnumeration(java.util.Enumeration list)
          Create a DefaultObjectEntryEnumeration from an Enumeration of ObjectEntrys.
DefaultObjectEntryEnumeration(ObjectEntry entry)
          This is a convenience constructor for creating an ObjectEntryEnumeration with a single entry.
DefaultObjectEntryEnumeration(ObjectEntry[] list)
          Creates a DefaultObjectEntryEnumeration from an array of ObjectEntrys.
DefaultObjectEntryEnumeration(java.util.Vector list)
          Creates a DefaultObjectEntryEnumeration from a Vector of ObjectEntrys.
 
Method Summary
 int getCount()
          Return the number of ObjectEntries in the Enumeration.
 int getCountReliability()
          Returns an integer which is a representation of the reliability of the count of objects in this enumeration.
 boolean hasMoreElements()
          Returns a boolean determining if there are more children in the enumeration.
 ObjectEntry next()
          Return the next child as an ObjectEntry.
 java.lang.Object nextElement()
          Return the next child as an Object (must still be an ObjectEntry).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultObjectEntryEnumeration

public DefaultObjectEntryEnumeration()
Creates an empty DefaultObjectEntryEnumeration. This is a convenience constructor for creating an ObjectEntryEnumeration with no entries.


DefaultObjectEntryEnumeration

public DefaultObjectEntryEnumeration(java.util.Enumeration list)
Create a DefaultObjectEntryEnumeration from an Enumeration of ObjectEntrys.

Parameters:
list - ObjectEntry enumeration from which to create a simple enumeration.

DefaultObjectEntryEnumeration

public DefaultObjectEntryEnumeration(ObjectEntry entry)
This is a convenience constructor for creating an ObjectEntryEnumeration with a single entry.

Parameters:
entry - ObjectEntry from which to create a simple enumeration.

DefaultObjectEntryEnumeration

public DefaultObjectEntryEnumeration(ObjectEntry[] list)
Creates a DefaultObjectEntryEnumeration from an array of ObjectEntrys.

Parameters:
list - ObjectEntry array from which to create a simple enumeration.

DefaultObjectEntryEnumeration

public DefaultObjectEntryEnumeration(java.util.Vector list)
Creates a DefaultObjectEntryEnumeration from a Vector of ObjectEntrys.

Parameters:
list - ObjectEntry vector from which to create a simple enumeration.
Method Detail

getCount

public int getCount()
Return the number of ObjectEntries in the Enumeration.

Specified by:
getCount in interface CountableObjectEntryEnumeration
Returns:
The number of ObjectEntries. If the count is not available then -1 is returned.

getCountReliability

public int getCountReliability()
Returns an integer which is a representation of the reliability of the count of objects in this enumeration.

Specified by:
getCountReliability in interface CountableObjectEntryEnumeration
Returns:
The integer representation for the reliability of the count EXACTCOUNT (1) - exact count, we know we have exactly this many objects APPROXIMATECOUNT (2) - approximate count. This is most likely the total number of objects within the container (the subordinate count) It could actually be more than the number of objects in this enumeration because of selective search criteria BASECOUNT (3) - base count. This is the number of objects represented in this enumeration, but because of size/memory restrictions there is actually more objects in the directory that match this search criteria. This is all the objects that can be contained in this enumeration. PARTIALCOUNT (4) - partial count. This is the number of objects represented in this buffer (JCListEnumerator to multiple JClient.listToJCListEnumerator to to DDCListToBuffer calls). There may be more objects if the DDCListToBuffer was called additional times UNKNOWNCOUNT (5) - unknown count. I have no idea.

hasMoreElements

public boolean hasMoreElements()
Returns a boolean determining if there are more children in the enumeration.

Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
A boolean set to true if there are more children in the enumeration, otherwise set to false.

next

public ObjectEntry next()
                 throws java.util.NoSuchElementException
Return the next child as an ObjectEntry.

Specified by:
next in interface ObjectEntryEnumeration
Returns:
The next child ObjectEntry.
Throws:
java.util.NoSuchElementException - Throws when there is no 'next' element.

nextElement

public java.lang.Object nextElement()
Return the next child as an Object (must still be an ObjectEntry).

Specified by:
nextElement in interface java.util.Enumeration
Returns:
The next child Object.


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 September 2 2004 0111.