Package wt.util
Class SortedEnumeration
java.lang.Object
wt.util.SortedEnumeration
- All Implemented Interfaces:
Serializable,Enumeration
An enumeration that returns objects in sorted order.
Supported API: true
Supported API: true
Supported API: true
Supported API: true
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSortedEnumeration(Enumeration source, CollationKeyFactory key_factory) Construct a sortedEnumerationcontaining the elements of anotherEnumeration.SortedEnumeration(Enumeration source, CollationKeyFactory key_factory, int order) Construct a sortedEnumerationcontaining the elements of anotherEnumeration. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Supported API: true
Supported API: trueintsize()Return the number of elements remaining in the enumeration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Enumeration
asIterator
-
Constructor Details
-
SortedEnumeration
Construct a sortedEnumerationcontaining the elements of anotherEnumeration. Elements are sorted into ascending order.
Supported API: true- Parameters:
source- sourceEnumerationcollation_key_factory- factory to produce collation keys for the elementsorder- sort order (ASCENDING or DECENDING)
-
SortedEnumeration
Construct a sortedEnumerationcontaining the elements of anotherEnumeration.
Supported API: true- Parameters:
source- sourceEnumerationcollation_key_factory- factory to produce collation keys for the elementsorder- sort order (ASCENDING or DECENDING)
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()
Supported API: true- Specified by:
hasMoreElementsin interfaceEnumeration
-
nextElement
Supported API: true- Specified by:
nextElementin interfaceEnumeration
-
size
public int size()Return the number of elements remaining in the enumeration. Since each element of the underlying enumeration had to be accessed in order to sort them, the total number of elements is known.
Supported API: true- Returns:
- number of elements remaining
-