org.apache.commons.collections.iterators
Class ProxyListIterator

java.lang.Object
  |
  +--org.apache.commons.collections.iterators.ProxyListIterator
Direct Known Subclasses:
FilterListIterator

public class ProxyListIterator
extends Object
implements ListIterator

A proxy ListIterator which delegates its methods to a proxy instance.

Since:
2.0
Version:
$Revision: 1.1 $ $Date: 2002/08/15 23:13:51 $
Author:
Rodney Waldhoff
See Also:
ProxyIterator

Constructor Summary
ProxyListIterator()
          Constructs a new ProxyListIterator that will not function until setListIterator is invoked.
ProxyListIterator(ListIterator iterator)
          Constructs a new ProxyListIterator that will use the given list iterator.
 
Method Summary
 void add(Object o)
          Invokes the underlying ListIterator.add(Object) method.
 ListIterator getListIterator()
          Getter for property iterator.
 boolean hasNext()
          Invokes the underlying ListIterator.hasNext() method.
 boolean hasPrevious()
          Invokes the underlying ListIterator.hasPrevious() method.
 Object next()
          Invokes the underlying ListIterator.next() method.
 int nextIndex()
          Invokes the underlying ListIterator.nextIndex() method.
 Object previous()
          Invokes the underlying ListIterator.previous() method.
 int previousIndex()
          Invokes the underlying ListIterator.previousIndex() method.
 void remove()
          Invokes the underlying ListIterator.remove() method.
 void set(Object o)
          Invokes the underlying ListIterator.set(Object) method.
 void setListIterator(ListIterator iterator)
          Setter for property iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyListIterator

public ProxyListIterator()
Constructs a new ProxyListIterator that will not function until setListIterator is invoked.

ProxyListIterator

public ProxyListIterator(ListIterator iterator)
Constructs a new ProxyListIterator that will use the given list iterator.
Parameters:
iterator - the list iterator to use
Method Detail

add

public void add(Object o)
Invokes the underlying ListIterator.add(Object) method.
Specified by:
add in interface ListIterator
Throws:
NullPointerException - if the underyling iterator is null

hasNext

public boolean hasNext()
Invokes the underlying ListIterator.hasNext() method.
Specified by:
hasNext in interface ListIterator
Throws:
NullPointerException - if the underyling iterator is null

hasPrevious

public boolean hasPrevious()
Invokes the underlying ListIterator.hasPrevious() method.
Specified by:
hasPrevious in interface ListIterator
Throws:
NullPointerException - if the underyling iterator is null

next

public Object next()
Invokes the underlying ListIterator.next() method.
Specified by:
next in interface ListIterator
Throws:
NullPointerException - if the underyling iterator is null

nextIndex

public int nextIndex()
Invokes the underlying ListIterator.nextIndex() method.
Specified by:
nextIndex in interface ListIterator
Throws:
NullPointerException - if the underyling iterator is null

previous

public Object previous()
Invokes the underlying ListIterator.previous() method.
Specified by:
previous in interface ListIterator
Throws:
NullPointerException - if the underyling iterator is null

previousIndex

public int previousIndex()
Invokes the underlying ListIterator.previousIndex() method.
Specified by:
previousIndex in interface ListIterator
Throws:
NullPointerException - if the underyling iterator is null

remove

public void remove()
Invokes the underlying ListIterator.remove() method.
Specified by:
remove in interface ListIterator
Throws:
NullPointerException - if the underyling iterator is null

set

public void set(Object o)
Invokes the underlying ListIterator.set(Object) method.
Specified by:
set in interface ListIterator
Throws:
NullPointerException - if the underyling iterator is null

getListIterator

public ListIterator getListIterator()
Getter for property iterator.
Returns:
Value of property iterator.

setListIterator

public void setListIterator(ListIterator iterator)
Setter for property iterator.
Parameters:
iterator - New value of property iterator.


Copyright © 2001-2002 Apache Software Foundation. Documenation generated October 21 2002.