Class TransformIterator<E,W>
java.lang.Object
com.aoapps.collections.transformers.TransformIterator<E,W>
- All Implemented Interfaces:
Iterator<E>
- Direct Known Subclasses:
TransformListIterator
Wraps an
Iterator, with optional type conversion.- Author:
- AO Industries, Inc.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTransformIterator(Iterator<W> wrapped, Transformer<E, W> transformer) -
Method Summary
Modifier and TypeMethodDescriptionvoidforEachRemaining(Consumer<? super E> action) booleanhasNext()next()static <E> TransformIterator<E, E> static <E,W> TransformIterator <E, W> of(Iterator<W> iterator, Transformer<E, W> transformer) Wraps an iterator.voidremove()
-
Field Details
-
transformer
-
-
Constructor Details
-
TransformIterator
-
-
Method Details
-
of
Wraps an iterator.- If the given iterator is a
ListIterator, then will return aTransformListIterator.
- See Also:
- If the given iterator is a
-
of
- See Also:
-
getWrapped
-
hasNext
public boolean hasNext() -
next
- Specified by:
nextin interfaceIterator<E>- Throws:
NoSuchElementException
-
remove
public void remove() -
forEachRemaining
- Specified by:
forEachRemainingin interfaceIterator<E>
-
