org.apache.commons.collections.iterators

Class ProxyListIterator

public class ProxyListIterator extends Object implements ListIterator

Deprecated: Use AbstractListIteratorDecorator. Will be removed in v4.0

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

Since: Commons Collections 2.0

Version: $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $

Author: Rodney Waldhoff

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
voidadd(Object o)
Invokes the underlying ListIterator#add(Object) method.
ListIteratorgetListIterator()
Getter for property iterator.
booleanhasNext()
Invokes the underlying ListIterator#hasNext() method.
booleanhasPrevious()
Invokes the underlying ListIterator#hasPrevious() method.
Objectnext()
Invokes the underlying ListIterator#next() method.
intnextIndex()
Invokes the underlying ListIterator#nextIndex() method.
Objectprevious()
Invokes the underlying ListIterator#previous() method.
intpreviousIndex()
Invokes the underlying ListIterator#previousIndex() method.
voidremove()
Invokes the underlying ListIterator#remove() method.
voidset(Object o)
Invokes the underlying ListIterator#set(Object) method.
voidsetListIterator(ListIterator iterator)
Setter for property iterator.

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.

Throws: NullPointerException if the underlying iterator is null

getListIterator

public ListIterator getListIterator()
Getter for property iterator.

Returns: Value of property iterator.

hasNext

public boolean hasNext()
Invokes the underlying ListIterator#hasNext() method.

Throws: NullPointerException if the underlying iterator is null

hasPrevious

public boolean hasPrevious()
Invokes the underlying ListIterator#hasPrevious() method.

Throws: NullPointerException if the underlying iterator is null

next

public Object next()
Invokes the underlying ListIterator#next() method.

Throws: NullPointerException if the underlying iterator is null

nextIndex

public int nextIndex()
Invokes the underlying ListIterator#nextIndex() method.

Throws: NullPointerException if the underlying iterator is null

previous

public Object previous()
Invokes the underlying ListIterator#previous() method.

Throws: NullPointerException if the underlying iterator is null

previousIndex

public int previousIndex()
Invokes the underlying ListIterator#previousIndex() method.

Throws: NullPointerException if the underlying iterator is null

remove

public void remove()
Invokes the underlying ListIterator#remove() method.

Throws: NullPointerException if the underlying iterator is null

set

public void set(Object o)
Invokes the underlying ListIterator#set(Object) method.

Throws: NullPointerException if the underlying iterator is null

setListIterator

public void setListIterator(ListIterator iterator)
Setter for property iterator.

Parameters: iterator New value of property iterator.

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