java.lang.Object | +--org.apache.commons.collections.iterators.IteratorEnumerationAll Implemented Interfaces:
Constructs a new IteratorEnumeration that will not function until #setIterator(Iterator) setIterator is invoked. |
IteratorEnumeration(Iterator iterator) Constructs a new IteratorEnumeration that will use the given iterator. |
Iterator | Returns the underlying iterator. |
boolean | Returns true if the underlying iterator has more elements. |
Object | Returns the next element from the underlying iterator. |
void | setIterator(Iterator iterator) Sets the underlying iterator. |
public IteratorEnumeration()
IteratorEnumeration
that will not
function until setIterator(Iterator) setIterator is
invoked.
public IteratorEnumeration(Iterator iterator)
IteratorEnumeration
that will use
the given iterator.
public Iterator getIterator()
public boolean hasMoreElements()
public Object nextElement()
- if the underlying iterator has no
more elementspublic void setIterator(Iterator iterator)