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 void
add(E obj)
boolean
hasNext()
boolean
hasPrevious()
E
next()
int
nextIndex()
E
previous()
int
previousIndex()
void
remove()
void
set(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:
nextIndex
in interfaceListIterator<E>
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPrevious
in interfaceListIterator<E>
-
previous
public E previous()
- Specified by:
previous
in interfaceListIterator<E>
-
previousIndex
public int previousIndex()
- Specified by:
previousIndex
in interfaceListIterator<E>
-
remove
public void remove()
-
set
public void set(E obj)
- Specified by:
set
in interfaceListIterator<E>
-
add
public void add(E obj)
- Specified by:
add
in interfaceListIterator<E>
-
-