Class TransformListIterator<E,W>
java.lang.Object
com.aoapps.collections.transformers.TransformIterator<E,W>
com.aoapps.collections.transformers.TransformListIterator<E,W>
- All Implemented Interfaces:
Iterator<E>
,ListIterator<E>
Wraps a
ListIterator
, with optional type conversion.- Author:
- AO Industries, Inc.
-
Field Summary
Fields inherited from class com.aoapps.collections.transformers.TransformIterator
transformer
-
Constructor Summary
ModifierConstructorDescriptionprotected
TransformListIterator
(ListIterator<W> wrapped, Transformer<E, W> transformer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected ListIterator
<W> boolean
int
static <E> TransformListIterator
<E, E> of
(ListIterator<E> wrapped) static <E,
W> TransformListIterator <E, W> of
(ListIterator<W> wrapped, Transformer<E, W> transformer) Wraps a list iterator.previous()
int
void
Methods inherited from class com.aoapps.collections.transformers.TransformIterator
forEachRemaining, hasNext, next, of, of, remove
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
Methods inherited from interface java.util.ListIterator
hasNext, next, remove
-
Constructor Details
-
TransformListIterator
-
-
Method Details
-
of
public static <E,W> TransformListIterator<E,W> of(ListIterator<W> wrapped, Transformer<E, W> transformer) Wraps a list iterator. -
of
- See Also:
-
getWrapped
- Overrides:
getWrapped
in classTransformIterator<E,
W>
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceListIterator<E>
-
previous
- Specified by:
previous
in interfaceListIterator<E>
- Throws:
NoSuchElementException
-
nextIndex
public int nextIndex()- Specified by:
nextIndex
in interfaceListIterator<E>
-
previousIndex
public int previousIndex()- Specified by:
previousIndex
in interfaceListIterator<E>
-
set
- Specified by:
set
in interfaceListIterator<E>
-
add
- Specified by:
add
in interfaceListIterator<E>
-