Package com.google.common.collect
Class CollectSpliterators.FlatMapSpliteratorOfObject<InElementT,OutElementT>
- java.lang.Object
-
- com.google.common.collect.CollectSpliterators.FlatMapSpliterator<InElementT,OutElementT,java.util.Spliterator<OutElementT>>
-
- com.google.common.collect.CollectSpliterators.FlatMapSpliteratorOfObject<InElementT,OutElementT>
-
- Type Parameters:
InElementT
- the element type of the input spliteratorOutElementT
- the element type of the output spliterators
- All Implemented Interfaces:
java.util.Spliterator<OutElementT>
- Enclosing class:
- CollectSpliterators
static final class CollectSpliterators.FlatMapSpliteratorOfObject<InElementT,OutElementT> extends CollectSpliterators.FlatMapSpliterator<InElementT,OutElementT,java.util.Spliterator<OutElementT>>
Implementation ofStream#flatMap
with an object spliterator output type.To avoid having this type, we could use
FlatMapSpliterator
directly. The main advantages to having the type are the ability to use its constructor reference below and the parallelism with the primitive version. In short, it makes its caller (flatMap
) simpler.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.collect.CollectSpliterators.FlatMapSpliterator
CollectSpliterators.FlatMapSpliterator.Factory<InElementT,OutSpliteratorT extends java.util.Spliterator<?>>
-
Nested classes/interfaces inherited from interface java.util.Spliterator
java.util.Spliterator.OfDouble, java.util.Spliterator.OfInt, java.util.Spliterator.OfLong, java.util.Spliterator.OfPrimitive<T extends java.lang.Object,T_CONS extends java.lang.Object,T_SPLITR extends java.util.Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
-
-
Field Summary
-
Fields inherited from class com.google.common.collect.CollectSpliterators.FlatMapSpliterator
characteristics, estimatedSize, factory, from, function, prefix
-
-
Constructor Summary
Constructors Constructor Description FlatMapSpliteratorOfObject(java.util.Spliterator<OutElementT> prefix, java.util.Spliterator<InElementT> from, java.util.function.Function<? super InElementT,java.util.Spliterator<OutElementT>> function, int characteristics, long estimatedSize)
-
Method Summary
-
Methods inherited from class com.google.common.collect.CollectSpliterators.FlatMapSpliterator
characteristics, estimateSize, forEachRemaining, tryAdvance, trySplit
-
-
-
-
Constructor Detail
-
FlatMapSpliteratorOfObject
FlatMapSpliteratorOfObject(java.util.Spliterator<OutElementT> prefix, java.util.Spliterator<InElementT> from, java.util.function.Function<? super InElementT,java.util.Spliterator<OutElementT>> function, int characteristics, long estimatedSize)
-
-