org.apache.commons.collections.iterators

Class AbstractListIteratorDecorator

public class AbstractListIteratorDecorator extends 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

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

Author: Rodney Waldhoff Stephen Colebourne

Field Summary
protected ListIteratoriterator
The iterator being decorated
Constructor Summary
AbstractListIteratorDecorator(ListIterator iterator)
Constructor that decorates the specified iterator.
Method Summary
voidadd(Object obj)
protected ListIteratorgetListIterator()
Gets the iterator being decorated.
booleanhasNext()
booleanhasPrevious()
Objectnext()
intnextIndex()
Objectprevious()
intpreviousIndex()
voidremove()
voidset(Object obj)

Field Detail

iterator

protected final ListIterator iterator
The iterator being decorated

Constructor Detail

AbstractListIteratorDecorator

public AbstractListIteratorDecorator(ListIterator iterator)
Constructor that decorates the specified iterator.

Parameters: iterator the iterator to decorate, must not be null

Throws: IllegalArgumentException if the collection is null

Method Detail

add

public void add(Object 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)
Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.