Class AbstractListIteratorDecorator<E>
- java.lang.Object
-
- org.apache.commons.collections4.iterators.AbstractListIteratorDecorator<E>
-
- All Implemented Interfaces:
java.util.Iterator<E>
,java.util.ListIterator<E>
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 void
add(E obj)
boolean
hasNext()
boolean
hasPrevious()
E
next()
int
nextIndex()
E
previous()
int
previousIndex()
void
remove()
void
set(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
-
hasNext
public boolean hasNext()
-
next
public E next()
-
nextIndex
public int nextIndex()
- Specified by:
nextIndex
in interfacejava.util.ListIterator<E>
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPrevious
in interfacejava.util.ListIterator<E>
-
previousIndex
public int previousIndex()
- Specified by:
previousIndex
in interfacejava.util.ListIterator<E>
-
remove
public void remove()
-
-