java.lang.Object | |
↳ | org.apache.commons.collections.iterators.IteratorEnumeration |
Adapter to make an Iterator Iterator instance appear to be an Enumeration Enumeration instance.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new
IteratorEnumeration that will not
function until setIterator is
invoked. | |||||||||||
Constructs a new
IteratorEnumeration that will use
the given iterator. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the underlying iterator.
| |||||||||||
Returns true if the underlying iterator has more elements.
| |||||||||||
Returns the next element from the underlying iterator.
| |||||||||||
Sets the underlying iterator.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.util.Enumeration
|
Constructs a new IteratorEnumeration
that will not
function until setIterator
is
invoked.
Constructs a new IteratorEnumeration
that will use
the given iterator.
iterator | the iterator to use |
---|
Returns true if the underlying iterator has more elements.
Returns the next element from the underlying iterator.
NoSuchElementException | if the underlying iterator has no more elements |
---|
Sets the underlying iterator.
iterator | the new underlying iterator |
---|