E
- The type of the enumerated elements.public class IteratorEnumeration<E>
extends java.lang.Object
implements java.util.Enumeration<E>
Iterator
instance appear to be an
Enumeration
instance.Constructor and Description |
---|
IteratorEnumeration(java.util.Iterator<E> iterator)
Constructs a new
IteratorEnumeration that will use the given
iterator. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreElements()
Returns true if the underlying iterator has more elements.
|
E |
nextElement()
Returns the next element from the underlying iterator.
|
public IteratorEnumeration(java.util.Iterator<E> iterator)
IteratorEnumeration
that will use the given
iterator.iterator
- the iterator to usepublic boolean hasMoreElements()
hasMoreElements
in interface java.util.Enumeration<E>