| java.lang.Object | |
| ↳ | org.apache.commons.collections.iterators.EnumerationIterator |
Adapter to make Enumeration Enumeration instances appear to be Iterator Iterator instances.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new
EnumerationIterator that will not
function until setEnumeration(Enumeration) is called. | |||||||||||
Constructs a new
EnumerationIterator that provides
an iterator view of the given enumeration. | |||||||||||
Constructs a new
EnumerationIterator that will remove
elements from the specified collection. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns the underlying enumeration.
| |||||||||||
Returns true if the underlying enumeration has more elements.
| |||||||||||
Returns the next object from the enumeration.
| |||||||||||
Removes the last retrieved element if a collection is attached.
| |||||||||||
Sets the underlying enumeration.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.util.Iterator
| |||||||||||
Constructs a new EnumerationIterator that will not
function until setEnumeration(Enumeration) is called.
Constructs a new EnumerationIterator that provides
an iterator view of the given enumeration.
| enumeration | the enumeration to use |
|---|
Constructs a new EnumerationIterator that will remove
elements from the specified collection.
| enumeration | the enumeration to use |
|---|---|
| collection | the collection to remove elements form |
Returns the underlying enumeration.
Returns true if the underlying enumeration has more elements.
| NullPointerException | if the underlying enumeration is null |
|---|
Returns the next object from the enumeration.
| NullPointerException | if the enumeration is null |
|---|
Removes the last retrieved element if a collection is attached.
Functions if an associated Collection is known.
If so, the first occurrence of the last returned object from this
iterator will be removed from the collection.
| IllegalStateException | next() not called. |
|---|---|
| UnsupportedOperationException | if no associated collection |
Sets the underlying enumeration.
| enumeration | the new underlying enumeration |
|---|