Enumeration instances appear
to be Iterator instances.
| Modifier and Type | Field and Description |
|---|---|
| private final Collection | collection
The collection to remove elements from |
| private Enumeration | enumeration
The enumeration being converted |
| private E | last
The last object retrieved |
| Access | Constructor and Description |
|---|---|
| public | EnumerationIterator()
Constructs a new |
| public | EnumerationIterator(final Enumeration<? extends E>
the enumeration to use enumeration)Constructs a new |
| public | EnumerationIterator(final Enumeration<? extends E>
the enumeration to use enumeration, final Collection<? super E> the collection to remove elements from collection)Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| public Enumeration | |
| public boolean | Returns: true if the underlying enumeration has more elementsImplements java. |
| public E | Returns: the next object from the enumerationImplements java. |
| public void | remove()
Overrides default java. |
| public void | setEnumeration(final Enumeration<? extends E>
the new underlying enumeration enumeration)Sets the underlying enumeration. |
| collection | back to summary |
|---|---|
| private final Collection<? super E> collection The collection to remove elements from | |
| enumeration | back to summary |
|---|---|
| private Enumeration<? extends E> enumeration The enumeration being converted | |
| last | back to summary |
|---|---|
| private E last The last object retrieved | |
| EnumerationIterator | back to summary |
|---|---|
| public EnumerationIterator() Constructs a new | |
| EnumerationIterator | back to summary |
|---|---|
| public EnumerationIterator(final Enumeration<? extends E> enumeration) Constructs a new
| |
| EnumerationIterator | back to summary |
|---|---|
| public EnumerationIterator(final Enumeration<? extends E> enumeration, final Collection<? super E> collection) Constructs a new
| |
| getEnumeration | back to summary |
|---|---|
| public Enumeration Returns the underlying enumeration.
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Returns true if the underlying enumeration has more elements.
| |
| next | back to summary |
|---|---|
| public E next() Implements java. Returns the next object from the enumeration.
| |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Removes the last retrieved element if a collection is attached.
Functions if an associated
| |
| setEnumeration | back to summary |
|---|---|
| public void setEnumeration(final Enumeration<? extends E> enumeration) Sets the underlying enumeration.
| |