Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » util » [javadoc | source]
org.apache.catalina.util
public final class: Enumerator [javadoc | source]
java.lang.Object
   org.apache.catalina.util.Enumerator

All Implemented Interfaces:
    Enumeration

Adapter class that wraps an 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.
Constructor:
 public Enumerator(Collection collection) 
    Return an Enumeration over the values of the specified Collection.
    Parameters:
    collection - Collection whose values should be enumerated
 public Enumerator(Iterator iterator) 
    Return an Enumeration over the values returned by the specified Iterator.
    Parameters:
    iterator - Iterator to be wrapped
 public Enumerator(Map map) 
    Return an Enumeration over the values of the specified Map.
    Parameters:
    map - Map whose values should be enumerated
 public Enumerator(Collection collection,
    boolean clone) 
    Return an Enumeration over the values of the specified Collection.
    Parameters:
    collection - Collection whose values should be enumerated
    clone - true to clone iterator
 public Enumerator(Iterator iterator,
    boolean clone) 
    Return an Enumeration over the values returned by the specified Iterator.
    Parameters:
    iterator - Iterator to be wrapped
    clone - true to clone iterator
 public Enumerator(Map map,
    boolean clone) 
    Return an Enumeration over the values of the specified Map.
    Parameters:
    map - Map whose values should be enumerated
    clone - true to clone iterator
Method from org.apache.catalina.util.Enumerator Summary:
hasMoreElements,   nextElement
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.util.Enumerator Detail:
 public boolean hasMoreElements() 
    Tests if this enumeration contains more elements.
 public Object nextElement() throws NoSuchElementException 
    Returns the next element of this enumeration if this enumeration has at least one more element to provide.