org.apache.commons.collections.iterators
public class ProxyIterator extends Object implements Iterator
Deprecated: Use AbstractIteratorDecorator. Will be removed in v4.0
A ProxyIterator Iterator
which delegates its methods to a proxy instance.
Since: Commons Collections 1.0
Version: $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $
Constructor Summary | |
---|---|
ProxyIterator()
Constructs a new ProxyIterator that will not function
until setIterator is called. | |
ProxyIterator(Iterator iterator)
Constructs a new ProxyIterator that will use the
given iterator.
|
Method Summary | |
---|---|
Iterator | getIterator() 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. |
ProxyIterator
that will not function
until setIterator is called.ProxyIterator
that will use the
given iterator.
Parameters: iterator the underlying iterator
Returns: Value of property iterator.
Returns: true if the underlying iterator has more elements
Returns: the next element from the underlying iterator
Throws: java.util.NoSuchElementException if the underlying iterator raises it because it has no more elements
Parameters: iterator New value of property iterator.