Class AbstractListIteratorDecorator<E>
- java.lang.Object
-
- org.apache.commons.collections4.iterators.AbstractListIteratorDecorator<E>
-
- All Implemented Interfaces:
Iterator<E>,ListIterator<E>
public class AbstractListIteratorDecorator<E> extends Object implements 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(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)booleanhasNext()booleanhasPrevious()Enext()intnextIndex()Eprevious()intpreviousIndex()voidremove()voidset(E obj)-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
AbstractListIteratorDecorator
public AbstractListIteratorDecorator(ListIterator<E> iterator)
Constructor that decorates the specified iterator.- Parameters:
iterator- the iterator to decorate, must not be null- Throws:
NullPointerException- if the iterator is null
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
next
public E next()
-
nextIndex
public int nextIndex()
- Specified by:
nextIndexin interfaceListIterator<E>
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPreviousin interfaceListIterator<E>
-
previous
public E previous()
- Specified by:
previousin interfaceListIterator<E>
-
previousIndex
public int previousIndex()
- Specified by:
previousIndexin interfaceListIterator<E>
-
remove
public void remove()
-
set
public void set(E obj)
- Specified by:
setin interfaceListIterator<E>
-
add
public void add(E obj)
- Specified by:
addin interfaceListIterator<E>
-
-