|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xshare.base.iterator.EnumerationIterator
The EnumerationIterator
wrapps a given Enumeration
and adapts it to the Iterator
interface.
remove()
method is not supported, since
the Enumeration
does not provide
the possibility to remove elements.
Constructor Summary | |
EnumerationIterator(java.util.Enumeration pSource)
Creates a new instance of this iterator, which adapts a given enumeration. |
Method Summary | |
boolean |
hasNext()
Checks if there are elements of the underlying enumeration left to return or not. |
java.lang.Object |
next()
Returns the next element of the underlying enumeration. |
void |
remove()
This method is not supported, since the Enumeration
doesn't offer the possiblity to remove objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EnumerationIterator(java.util.Enumeration pSource)
java.lang.NullPointerException
- if null
is passed to the constructor instead of a enumeration.Method Detail |
public void remove()
Enumeration
doesn't offer the possiblity to remove objects.
remove
in interface java.util.Iterator
java.lang.UnsupportedOperationException
- if this method is
called.public java.lang.Object next()
next
in interface java.util.Iterator
NoSuchElementException
- if there are no elements
left to return. You can check this by calling hasNext()
.public boolean hasNext()
hasNext
in interface java.util.Iterator
boolean
value which is true
if there are elements left.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |