org.apache.commons.collections.iterators
Class ProxyIterator

java.lang.Object
  extended by org.apache.commons.collections.iterators.ProxyIterator
All Implemented Interfaces:
Iterator

Deprecated. Use AbstractIteratorDecorator. Will be removed in v4.0

public class ProxyIterator
extends Object
implements Iterator

A Proxy 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) $
Author:
James Strachan

Constructor Summary
ProxyIterator()
          Deprecated. Constructs a new ProxyIterator that will not function until setIterator(Iterator) is called.
ProxyIterator(Iterator iterator)
          Deprecated. Constructs a new ProxyIterator that will use the given iterator.
 
Method Summary
 Iterator getIterator()
          Deprecated. Getter for property iterator.
 boolean hasNext()
          Deprecated. Returns true if the underlying iterator has more elements.
 Object 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
 

Constructor Detail

ProxyIterator

public ProxyIterator()
Deprecated. 
Constructs a new ProxyIterator that will not function until setIterator(Iterator) is called.


ProxyIterator

public ProxyIterator(Iterator iterator)
Deprecated. 
Constructs a new ProxyIterator that 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:
hasNext in interface Iterator
Returns:
true if the underlying iterator has more elements

next

public Object next()
Deprecated. 
Returns the next element from the underlying iterator.

Specified by:
next in interface Iterator
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.

Specified by:
remove in interface Iterator

getIterator

public Iterator getIterator()
Deprecated. 
Getter for property iterator.

Returns:
Value of property iterator.

setIterator

public void setIterator(Iterator iterator)
Deprecated. 
Setter for property iterator.

Parameters:
iterator - New value of property iterator.


Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.