Class ProxyIterator
- java.lang.Object
-
- org.apache.commons.collections.iterators.ProxyIterator
-
- All Implemented Interfaces:
java.util.Iterator
public class ProxyIterator extends java.lang.Object implements java.util.IteratorDeprecated.Use AbstractIteratorDecorator. Will be removed in v4.0A ProxyIteratorwhich delegates its methods to a proxy instance.- Since:
- Commons Collections 1.0
-
-
Constructor Summary
Constructors Constructor Description ProxyIterator()Deprecated.Constructs a newProxyIteratorthat will not function untilsetIterator(Iterator)is called.ProxyIterator(java.util.Iterator iterator)Deprecated.Constructs a newProxyIteratorthat will use the given iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.IteratorgetIterator()Deprecated.Getter for property iterator.booleanhasNext()Deprecated.Returns true if the underlying iterator has more elements.java.lang.Objectnext()Deprecated.Returns the next element from the underlying iterator.voidremove()Deprecated.Removes the last returned element from the collection that spawned the underlying iterator.voidsetIterator(java.util.Iterator iterator)Deprecated.Setter for property iterator.
-
-
-
Constructor Detail
-
ProxyIterator
public ProxyIterator()
Deprecated.Constructs a newProxyIteratorthat will not function untilsetIterator(Iterator)is called.
-
ProxyIterator
public ProxyIterator(java.util.Iterator iterator)
Deprecated.Constructs a newProxyIteratorthat will use the given iterator.- Parameters:
iterator- the underlying iterator
-
-
Method Detail
-
hasNext
public boolean hasNext()
Deprecated.Returns true if the underlying iterator has more elements.- Specified by:
hasNextin interfacejava.util.Iterator- Returns:
- true if the underlying iterator has more elements
-
next
public java.lang.Object next()
Deprecated.Returns the next element from the underlying iterator.- Specified by:
nextin interfacejava.util.Iterator- Returns:
- the next element from the underlying iterator
- Throws:
java.util.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.- Specified by:
removein interfacejava.util.Iterator
-
getIterator
public java.util.Iterator getIterator()
Deprecated.Getter for property iterator.- Returns:
- Value of property iterator.
-
setIterator
public void setIterator(java.util.Iterator iterator)
Deprecated.Setter for property iterator.- Parameters:
iterator- New value of property iterator.
-
-