org.apache.catalina.util
public final class Enumerator extends Object implements Enumeration
Enumeration
around a Java2
collection classes object Iterator
so that existing APIs
returning Enumerations can easily run on top of the new collections.
Constructors are provided to easliy create such wrappers.
Version: $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $
Constructor Summary | |
---|---|
Enumerator(Collection collection)
Return an Enumeration over the values of the specified Collection.
| |
Enumerator(Collection collection, boolean clone)
Return an Enumeration over the values of the specified Collection.
| |
Enumerator(Iterator iterator)
Return an Enumeration over the values returned by the
specified Iterator.
| |
Enumerator(Iterator iterator, boolean clone)
Return an Enumeration over the values returned by the
specified Iterator.
| |
Enumerator(Map map)
Return an Enumeration over the values of the specified Map.
| |
Enumerator(Map map, boolean clone)
Return an Enumeration over the values of the specified Map.
|
Method Summary | |
---|---|
boolean | hasMoreElements()
Tests if this enumeration contains more elements.
|
Object | nextElement()
Returns the next element of this enumeration if this enumeration
has at least one more element to provide.
|
Parameters: collection Collection whose values should be enumerated
Parameters: collection Collection whose values should be enumerated clone true to clone iterator
Parameters: iterator Iterator to be wrapped
Parameters: iterator Iterator to be wrapped clone true to clone iterator
Parameters: map Map whose values should be enumerated
Parameters: map Map whose values should be enumerated clone true to clone iterator
Returns: true
if and only if this enumeration object
contains at least one more element to provide, false
otherwise
Returns: the next element of this enumeration
Throws: NoSuchElementException if no more elements exist