Class ProxyIterator
java.lang.Object
org.apache.commons.collections.iterators.ProxyIterator
- All Implemented Interfaces:
Iterator
Deprecated.
Use AbstractIteratorDecorator. Will be removed in v4.0
A Proxy
Iterator
which delegates its methods to a proxy instance.- Since:
- Commons Collections 1.0
- Version:
- $Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
- Author:
- James Strachan
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructs a newProxyIterator
that will not function untilsetIterator(Iterator)
is called.ProxyIterator
(Iterator iterator) Deprecated.Constructs a newProxyIterator
that will use the given iterator. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Getter for property iterator.boolean
hasNext()
Deprecated.Returns true if the underlying iterator has more elements.next()
Deprecated.Returns the next element from the underlying iterator.void
remove()
Deprecated.Removes the last returned element from the collection that spawned the underlying iterator.void
setIterator
(Iterator iterator) Deprecated.Setter for property iterator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
ProxyIterator
public ProxyIterator()Deprecated.Constructs a newProxyIterator
that will not function untilsetIterator(Iterator)
is called. -
ProxyIterator
Deprecated.Constructs a newProxyIterator
that will use the given iterator.- Parameters:
iterator
- the underlying iterator
-
-
Method Details
-
hasNext
public boolean hasNext()Deprecated.Returns true if the underlying iterator has more elements. -
next
Deprecated.Returns the next element from the underlying iterator.- Specified by:
next
in interfaceIterator
- Returns:
- the next element from the underlying iterator
- Throws:
NoSuchElementException
- if the underlying iterator raises it because it has no more elements
-
remove
public void remove()Deprecated.Removes the last returned element from the collection that spawned the underlying iterator. -
getIterator
Deprecated.Getter for property iterator.- Returns:
- Value of property iterator.
-
setIterator
Deprecated.Setter for property iterator.- Parameters:
iterator
- New value of property iterator.
-