Class TransformStreamable<S,T>
java.lang.Object
org.javimmutable.collections.iterators.TransformStreamable<S,T>
- All Implemented Interfaces:
Iterable<T>
,IStreamable<T>
,SplitableIterable<T>
-
Method Summary
Modifier and TypeMethodDescriptionint
iterator()
Overridden here to require implementations to return a SplitableIterator rather than a basic Iterator.static <S,
T> IStreamable <T> of
(IStreamable<S> source, java.util.function.Function<S, T> transforminator) static <K,
V> IStreamable <K> ofKeys
(IStreamable<IMapEntry<K, V>> source) static <K,
V> IStreamable <V> ofValues
(IStreamable<IMapEntry<K, V>> source) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.javimmutable.collections.IStreamable
parallelStream, spliterator, stream
Methods inherited from interface org.javimmutable.collections.SplitableIterable
forEachThrows, indexedForEach, indexedForEachThrows, reduce, reduceThrows
-
Method Details
-
of
public static <S,T> IStreamable<T> of(@Nonnull IStreamable<S> source, @Nonnull java.util.function.Function<S, T> transforminator) -
ofKeys
-
ofValues
-
iterator
Description copied from interface:IStreamable
Overridden here to require implementations to return a SplitableIterator rather than a basic Iterator. This is necessary to allow composition of new objects from methods like keys() and values().- Specified by:
iterator
in interfaceIStreamable<S>
- Specified by:
iterator
in interfaceIterable<S>
- Specified by:
iterator
in interfaceSplitableIterable<S>
-
getSpliteratorCharacteristics
public int getSpliteratorCharacteristics()- Specified by:
getSpliteratorCharacteristics
in interfaceIStreamable<S>
- Returns:
- characteristics value used when creating Spliterators
-