|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.collections.iterators.IteratorEnumeration
Adapter to make an Iterator instance appear to be
an Enumeration instance.
| Constructor Summary | |
IteratorEnumeration()
Constructs a new IteratorEnumeration that will not
function until setIterator is
invoked. |
|
IteratorEnumeration(Iterator iterator)
Constructs a new IteratorEnumeration that will use
the given iterator. |
|
| Method Summary | |
Iterator |
getIterator()
Returns the underlying iterator. |
boolean |
hasMoreElements()
Returns true if the underlying iterator has more elements. |
Object |
nextElement()
Returns the next element from the underlying iterator. |
void |
setIterator(Iterator iterator)
Sets the underlying iterator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public IteratorEnumeration()
IteratorEnumeration that will not
function until setIterator is
invoked.
public IteratorEnumeration(Iterator iterator)
IteratorEnumeration that will use
the given iterator.
iterator - the iterator to use| Method Detail |
public boolean hasMoreElements()
hasMoreElements in interface Enumerationpublic Object nextElement()
nextElement in interface EnumerationNoSuchElementException - if the underlying iterator has no
more elementspublic Iterator getIterator()
public void setIterator(Iterator iterator)
iterator - the new underlying iterator
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||