Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.collections.iterators
Class ProxyIterator

    java.lang.Object
      org.apache.commons.collections.iterators.ProxyIterator

All Implemented Interfaces:
  java.util.Iterator

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

    public class ProxyIterator

extends java.lang.Object
implements java.util.Iterator

A Proxy `Iterator` which delegates its methods to a proxy instance.

Since:
  Commons Collections 1.0
Version:
  $Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $
Author:
  James Strachan

Constructor Summary
`ProxyIterator()` Deprecated. Constructs a new `ProxyIterator` that will not function until `setIterator(Iterator)` is called.
`ProxyIterator(java.util.Iterator iterator)` Deprecated. Constructs a new `ProxyIterator` that will use the given iterator.

Method Summary
`java.util.Iterator` | `getIterator()` Deprecated. Getter for property iterator.
`boolean` | `hasNext()` Deprecated. Returns true if the underlying iterator has more elements.
`java.lang.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(java.util.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(java.util.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 `java.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:
    `next` in interface `java.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:
    `remove` in interface `java.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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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