public final class EnumerationIterator extends Object implements Iterator
Enumeration
.Constructor and Description |
---|
EnumerationIterator(Enumeration enumeration)
Constructs a new
EnumerationIterator on top of the
specified Enumeration . |
public EnumerationIterator(Enumeration enumeration) throws IllegalArgumentException
EnumerationIterator
on top of the
specified Enumeration
.enumeration
- the Enumeration
object, cannot be null
.IllegalArgumentException
- if enumeration == null
.public boolean hasNext()
public Object next() throws NoSuchElementException
next
in interface Iterator
NoSuchElementException
- if the iteration has no more elements.public void remove() throws UnsupportedOperationException
The implementation of this method in class
EnumerationIterator
always throws an
UnsupportedOperationException
.
remove
in interface Iterator
UnsupportedOperationException
- if this operation is not supported, which is the case for this
implementation, so always.See http://www.xins.org/.