Package org.plumelib.util
Class CollectionsPlume.IteratorEnumeration<T>
java.lang.Object
org.plumelib.util.CollectionsPlume.IteratorEnumeration<T>
- Type Parameters:
T
- the type of elements of the enumeration and iterator
- All Implemented Interfaces:
Enumeration<T>
- Enclosing class:
- CollectionsPlume
public static final class CollectionsPlume.IteratorEnumeration<T>
extends Object
implements Enumeration<T>
Converts an Iterator into an Enumeration.
-
Constructor Summary
ConstructorDescriptionIteratorEnumeration
(Iterator<T> itor) Create an Enumeration that contains the elements returned by the given Iterator. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Enumeration
asIterator
-
Constructor Details
-
IteratorEnumeration
Create an Enumeration that contains the elements returned by the given Iterator.- Parameters:
itor
- the Iterator to make an Enumeration from
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()- Specified by:
hasMoreElements
in interfaceEnumeration<T>
-
nextElement
- Specified by:
nextElement
in interfaceEnumeration<T>
-