Package net.cscott.jutil
Class IteratorEnumerator<E>
java.lang.Object
net.cscott.jutil.IteratorEnumerator<E>
- All Implemented Interfaces:
Enumeration<E>
An
IteratorEnumerator converts an Iterator
into an Enumeration. To enumerate a Collection,
Collections.enumeration(java.util.Collection) does
the same; Enumeration.asIterator() converts the other way.- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
-
Constructor Details
-
IteratorEnumerator
Creates aIteratorEnumerator.
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()- Specified by:
hasMoreElementsin interfaceEnumeration<E>
-
nextElement
- Specified by:
nextElementin interfaceEnumeration<E>
-