⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.collections.iterators

Class ProxyListIterator

java.lang.Object
|
+--org.apache.commons.collections.iterators.ProxyListIterator

All Implemented Interfaces:
ListIterator


public class ProxyListIterator
extends java.lang.Object
implements ListIterator

A proxy ListIterator ListIterator which delegates its methods to a proxy instance.
Since:
Commons Collections 2.0
Author:
Rodney Waldhoff

Constructor Summary

ProxyListIterator()

Constructs a new ProxyListIterator that will not function until #setListIterator(ListIterator) 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.

Constructor Details

ProxyListIterator

public ProxyListIterator()

Constructs a new ProxyListIterator that will not function until setListIterator(ListIterator) 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 Details

add

public void add(Object o)

Invokes the underlying ListIterator.add(Object) method.

Parameters:
o
Throws:
- 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:
- if the underlying iterator is null

hasPrevious

public boolean hasPrevious()

Invokes the underlying ListIterator.hasPrevious() method.

Throws:
- if the underlying iterator is null

next

public Object next()

Invokes the underlying ListIterator.next() method.

Throws:
- if the underlying iterator is null

nextIndex

public int nextIndex()

Invokes the underlying ListIterator.nextIndex() method.

Throws:
- if the underlying iterator is null

previous

public Object previous()

Invokes the underlying ListIterator.previous() method.

Throws:
- if the underlying iterator is null

previousIndex

public int previousIndex()

Invokes the underlying ListIterator.previousIndex() method.

Throws:
- if the underlying iterator is null

remove

public void remove()

Invokes the underlying ListIterator.remove() method.

Throws:
- if the underlying iterator is null

set

public void set(Object o)

Invokes the underlying ListIterator.set(Object) method.

Parameters:
o
Throws:
- if the underlying iterator is null

setListIterator

public void setListIterator(ListIterator iterator)

Setter for property iterator.

Parameters:
iterator - New value of property iterator.