Class AbstractListIteratorDecorator<E>
- java.lang.Object
-
- org.apache.commons.collections4.iterators.AbstractListIteratorDecorator<E>
-
- All Implemented Interfaces:
java.util.Iterator<E>,java.util.ListIterator<E>
- Direct Known Subclasses:
PredicatedList.PredicatedListIterator,TransformedList.TransformedListIterator
public class AbstractListIteratorDecorator<E> extends java.lang.Object implements java.util.ListIterator<E>Provides basic behaviour for decorating a list iterator with extra functionality.All methods are forwarded to the decorated list iterator.
- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description AbstractListIteratorDecorator(java.util.ListIterator<E> iterator)Constructor that decorates the specified iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(E obj)protected java.util.ListIterator<E>getListIterator()Gets the iterator being decorated.booleanhasNext()booleanhasPrevious()Enext()intnextIndex()Eprevious()intpreviousIndex()voidremove()voidset(E obj)
-
-
-
Constructor Detail
-
AbstractListIteratorDecorator
public AbstractListIteratorDecorator(java.util.ListIterator<E> iterator)
Constructor that decorates the specified iterator.- Parameters:
iterator- the iterator to decorate, must not be null- Throws:
java.lang.NullPointerException- if the iterator is null
-
-
Method Detail
-
getListIterator
protected java.util.ListIterator<E> getListIterator()
Gets the iterator being decorated.- Returns:
- the decorated iterator
-
hasNext
public boolean hasNext()
-
next
public E next()
-
nextIndex
public int nextIndex()
- Specified by:
nextIndexin interfacejava.util.ListIterator<E>
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPreviousin interfacejava.util.ListIterator<E>
-
previousIndex
public int previousIndex()
- Specified by:
previousIndexin interfacejava.util.ListIterator<E>
-
remove
public void remove()
-
-