|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.myarch.treeiterator.EnumerationAdapter
Implements java.util.Iterator interface for Enumeration.
Useful when java.util.Iterator interface is not supported directly.
| Constructor Summary | |
EnumerationAdapter(java.util.Enumeration enum)
Adapter constructor. |
|
| Method Summary | |
boolean |
hasNext()
Returns true if the iteration has more elements. |
java.lang.Object |
next()
Returns the next element in the interation. |
void |
remove()
This method is defined to comply with Iterator but it is not supported. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EnumerationAdapter(java.util.Enumeration enum)
enum - any object implementing Enumeration| Method Detail |
public java.lang.Object next()
next in interface java.util.IteratorNoSuchElementException - if no more elements exist.public boolean hasNext()
hasNext in interface java.util.Iterator
public void remove()
throws java.lang.UnsupportedOperationException
Iterator but it is not supported.remove in interface java.util.Iteratorjava.lang.UnsupportedOperationException - whenever it is called
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||