|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.util.IteratorEnumerationBridge<E>
E - the type of the bridged Enumeration/Iteratorpublic final class IteratorEnumerationBridge<E>
a bridge between Iterator and Enumeration.
This class allows you to treat an Enumeration as an Iterator
and vice versa. Moreover it can be directly used in for-each loops (enhanced
for loops).
| Constructor Summary | |
|---|---|
IteratorEnumerationBridge(java.util.Enumeration<E> e)
creates a new IteratorEnumerationBridge operating on the given
Enumeration. |
|
IteratorEnumerationBridge(java.util.Iterator<E> i)
creates a new IteratorEnumerationBridge operating on the given
Iterator. |
|
| Method Summary | |
|---|---|
boolean |
hasMoreElements()
|
boolean |
hasNext()
|
java.util.Iterator<E> |
iterator()
|
E |
next()
|
E |
nextElement()
|
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IteratorEnumerationBridge(java.util.Enumeration<E> e)
IteratorEnumerationBridge operating on the given
Enumeration.
e - the enumeration to be bridgedpublic IteratorEnumerationBridge(java.util.Iterator<E> i)
IteratorEnumerationBridge operating on the given
Iterator.
i - the iterator to be bridged| Method Detail |
|---|
public boolean hasMoreElements()
hasMoreElements in interface java.util.Enumeration<E>public E nextElement()
nextElement in interface java.util.Enumeration<E>public boolean hasNext()
hasNext in interface java.util.Iterator<E>public E next()
next in interface java.util.Iterator<E>public void remove()
remove in interface java.util.Iterator<E>java.lang.UnsupportedOperationException - if the underlying type is a Enumeration or the
underlying Iterator does not support the remove
operation
java.lang.IllegalStateException - if the remove operation is performed at an illegal state of
the underlying Iteratorpublic java.util.Iterator<E> iterator()
iterator in interface java.lang.Iterable<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||