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

Class AbstractListIteratorDecorator

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

All Implemented Interfaces:
ListIterator

Known Direct Subclasses:
PredicatedList.PredicatedListIterator, TransformedList.TransformedListIterator


public class AbstractListIteratorDecorator
extends java.lang.Object
implements ListIterator

Provides basic behaviour for decorating a list iterator with extra functionality.

All methods are forwarded to the decorated list iterator.

Since:
Commons Collections 3.0
Authors:
Rodney Waldhoff
Stephen Colebourne

Field Summary

ListIterator

iterator

The iterator being decorated

Constructor Summary

AbstractListIteratorDecorator(ListIterator iterator)

Constructor that decorates the specified iterator.

Method Summary

void

add(Object obj)

ListIterator

getListIterator()

Gets the iterator being decorated.

boolean

hasNext()

boolean

hasPrevious()

Object

next()

int

nextIndex()

Object

previous()

int

previousIndex()

void

remove()

void

set(Object obj)

Field Details

iterator

protected final ListIterator iterator

The iterator being decorated

Constructor Details

AbstractListIteratorDecorator

public AbstractListIteratorDecorator(ListIterator iterator)

Constructor that decorates the specified iterator.

Parameters:
iterator - the iterator to decorate, must not be null
Throws:
- if the collection is null

Method Details

add

public void add(Object obj)

Parameters:
obj

getListIterator

protected ListIterator getListIterator()

Gets the iterator being decorated.

Returns:
the decorated iterator

hasNext

public boolean hasNext()


hasPrevious

public boolean hasPrevious()


next

public Object next()


nextIndex

public int nextIndex()


previous

public Object previous()


previousIndex

public int previousIndex()


remove

public void remove()


set

public void set(Object obj)

Parameters:
obj