java.lang.Object | +--org.apache.commons.collections.iterators.ProxyIteratorAll Implemented Interfaces:
Constructs a new ProxyIterator that will not function until #setIterator(Iterator) is called. |
ProxyIterator(Iterator iterator) Constructs a new ProxyIterator that will use the given iterator. |
Iterator | Getter for property iterator. |
boolean | hasNext() Returns true if the underlying iterator has more elements. |
Object | next() Returns the next element from the underlying iterator. |
void | remove() Removes the last returned element from the collection that spawned the underlying iterator. |
void | setIterator(Iterator iterator) Setter for property iterator. |
public ProxyIterator()
ProxyIterator
that will not function
until setIterator(Iterator) is called.
public ProxyIterator(Iterator iterator)
ProxyIterator
that will use the
given iterator.
public Iterator getIterator()
public boolean hasNext()
public Object next()
- if the underlying iterator
raises it because it has no more elementspublic void remove()
public void setIterator(Iterator iterator)