Class MappingContainerViewIterator<E,T>
java.lang.Object
ch.nolix.base.container.arraylist.MappingContainerViewIterator<E,T>
- Type Parameters:
E- is the type of the elements of aMappingContainerViewIterator.T- is the type of the elements aMappingContainerViewIteratormaps from its elements.
- All Implemented Interfaces:
CopyableIterator<T>, Copyable<CopyableIterator<T>>, Iterator<T>
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,T2> MappingContainerViewIterator <T, T2> forIteratorAndMapper(CopyableIterator<T> iterator, Function<T, T2> mapper) getCopy()booleanhasNext()next()Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining, remove
-
Method Details
-
forIteratorAndMapper
public static <T,T2> MappingContainerViewIterator<T,T2> forIteratorAndMapper(CopyableIterator<T> iterator, Function<T, T2> mapper) - Type Parameters:
T- is the type of the elements of the createdMappingContainerViewIterator.T2- is the type of the elements the createdMappingContainerViewIteratormaps from its elements.- Parameters:
iterator-mapper-- Returns:
- a new
MappingContainerViewIteratorwith the given iterator and mapper. - Throws:
RuntimeException- if the given container is null.RuntimeException- if the given mapper is null.
-
getCopy
-
hasNext
-
next
-