|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xins.common.collections.EnumerationIterator
Iterator implementation that reads from an Enumeration
.
Constructor Summary | |
EnumerationIterator(Enumeration enumeration)
Constructs a new EnumerationIterator on top of the
specified Enumeration . |
Method Summary | |
boolean |
hasNext()
Checks if the iteration has more elements. |
Object |
next()
Returns the next element in the iteration. |
void |
remove()
Removes the last element returned by the iterator (unsupported operation). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EnumerationIterator(Enumeration enumeration) throws IllegalArgumentException
EnumerationIterator
on top of the
specified Enumeration
.
enumeration
- the Enumeration
object, cannot be null
.
IllegalArgumentException
- if enumeration == null
.Method Detail |
public boolean hasNext()
hasNext
in interface Iterator
true
if the iteration has more elements,
false
otherwise.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.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |