Class AbstractListIteratorDecorator<E>
java.lang.Object
org.apache.commons.collections4.iterators.AbstractListIteratorDecorator<E>
- All Implemented Interfaces:
Iterator<E>
,ListIterator<E>
- Direct Known Subclasses:
FixedSizeList.FixedSizeListIterator
,PredicatedList.PredicatedListIterator
,SetUniqueList.SetListListIterator
,TransformedList.TransformedListIterator
Provides basic behaviour for decorating a list iterator with extra functionality.
All methods are forwarded to the decorated list iterator.
- Since:
- 3.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractListIteratorDecorator
(ListIterator<E> iterator) Constructor that decorates the specified iterator. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
iterator
The iterator being decorated
-
-
Constructor Details
-
AbstractListIteratorDecorator
Constructor that decorates the specified iterator.- Parameters:
iterator
- the iterator to decorate, must not be null- Throws:
NullPointerException
- if the iterator is null
-
-
Method Details
-
getListIterator
Gets the iterator being decorated.- Returns:
- the decorated iterator
-
hasNext
public boolean hasNext() -
next
-
nextIndex
public int nextIndex()- Specified by:
nextIndex
in interfaceListIterator<E>
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceListIterator<E>
-
previous
- Specified by:
previous
in interfaceListIterator<E>
-
previousIndex
public int previousIndex()- Specified by:
previousIndex
in interfaceListIterator<E>
-
remove
public void remove() -
set
- Specified by:
set
in interfaceListIterator<E>
-
add
- Specified by:
add
in interfaceListIterator<E>
-