Class AbstractListIteratorDecorator
- java.lang.Object
-
- org.apache.commons.collections.iterators.AbstractListIteratorDecorator
-
- All Implemented Interfaces:
java.util.Iterator,java.util.ListIterator
- Direct Known Subclasses:
PredicatedList.PredicatedListIterator,TransformedList.TransformedListIterator
public class AbstractListIteratorDecorator extends java.lang.Object implements java.util.ListIteratorProvides 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: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
- Author:
- Rodney Waldhoff, Stephen Colebourne
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ListIteratoriteratorThe iterator being decorated
-
Constructor Summary
Constructors Constructor Description AbstractListIteratorDecorator(java.util.ListIterator iterator)Constructor that decorates the specified iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.Object obj)protected java.util.ListIteratorgetListIterator()Gets the iterator being decorated.booleanhasNext()booleanhasPrevious()java.lang.Objectnext()intnextIndex()java.lang.Objectprevious()intpreviousIndex()voidremove()voidset(java.lang.Object obj)
-
-
-
Constructor Detail
-
AbstractListIteratorDecorator
public AbstractListIteratorDecorator(java.util.ListIterator iterator)
Constructor that decorates the specified iterator.- Parameters:
iterator- the iterator to decorate, must not be null- Throws:
java.lang.IllegalArgumentException- if the collection is null
-
-
Method Detail
-
getListIterator
protected java.util.ListIterator getListIterator()
Gets the iterator being decorated.- Returns:
- the decorated iterator
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator- Specified by:
hasNextin interfacejava.util.ListIterator
-
next
public java.lang.Object next()
- Specified by:
nextin interfacejava.util.Iterator- Specified by:
nextin interfacejava.util.ListIterator
-
nextIndex
public int nextIndex()
- Specified by:
nextIndexin interfacejava.util.ListIterator
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPreviousin interfacejava.util.ListIterator
-
previous
public java.lang.Object previous()
- Specified by:
previousin interfacejava.util.ListIterator
-
previousIndex
public int previousIndex()
- Specified by:
previousIndexin interfacejava.util.ListIterator
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator- Specified by:
removein interfacejava.util.ListIterator
-
set
public void set(java.lang.Object obj)
- Specified by:
setin interfacejava.util.ListIterator
-
add
public void add(java.lang.Object obj)
- Specified by:
addin interfacejava.util.ListIterator
-
-