Class AbstractListIteratorDecorator
- java.lang.Object
-
- org.apache.commons.collections.iterators.AbstractListIteratorDecorator
-
- All Implemented Interfaces:
java.util.Iterator
,java.util.ListIterator
- Direct Known Subclasses:
FixedSizeList.FixedSizeListIterator
,PredicatedList.PredicatedListIterator
,SetUniqueList.SetListListIterator
,TransformedList.TransformedListIterator
public class AbstractListIteratorDecorator extends java.lang.Object implements java.util.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: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ListIterator
iterator
The 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 void
add(java.lang.Object obj)
protected java.util.ListIterator
getListIterator()
Gets the iterator being decorated.boolean
hasNext()
boolean
hasPrevious()
java.lang.Object
next()
int
nextIndex()
java.lang.Object
previous()
int
previousIndex()
void
remove()
void
set(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:
hasNext
in interfacejava.util.Iterator
- Specified by:
hasNext
in interfacejava.util.ListIterator
-
next
public java.lang.Object next()
- Specified by:
next
in interfacejava.util.Iterator
- Specified by:
next
in interfacejava.util.ListIterator
-
nextIndex
public int nextIndex()
- Specified by:
nextIndex
in interfacejava.util.ListIterator
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPrevious
in interfacejava.util.ListIterator
-
previous
public java.lang.Object previous()
- Specified by:
previous
in interfacejava.util.ListIterator
-
previousIndex
public int previousIndex()
- Specified by:
previousIndex
in interfacejava.util.ListIterator
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator
- Specified by:
remove
in interfacejava.util.ListIterator
-
set
public void set(java.lang.Object obj)
- Specified by:
set
in interfacejava.util.ListIterator
-
add
public void add(java.lang.Object obj)
- Specified by:
add
in interfacejava.util.ListIterator
-
-