Package com.google.common.collect
Class CollectSpliterators.FlatMapSpliteratorOfObject<InElementT,OutElementT>
java.lang.Object
com.google.common.collect.CollectSpliterators.FlatMapSpliterator<InElementT,OutElementT,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:
Spliterator<OutElementT>
- Enclosing class:
CollectSpliterators
static final class CollectSpliterators.FlatMapSpliteratorOfObject<InElementT,OutElementT>
extends CollectSpliterators.FlatMapSpliterator<InElementT,OutElementT,Spliterator<OutElementT>>
Implementation of
with an object spliterator output type.
invalid reference
Stream#flatMap
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 Spliterator<?>> Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,
T_CONS, T_SPLITR extends 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
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
-
Constructor Summary
ConstructorsConstructorDescriptionFlatMapSpliteratorOfObject
(Spliterator<OutElementT> prefix, Spliterator<InElementT> from, Function<? super InElementT, Spliterator<OutElementT>> function, int characteristics, long estimatedSize) -
Method Summary
Methods inherited from class com.google.common.collect.CollectSpliterators.FlatMapSpliterator
characteristics, estimateSize, forEachRemaining, tryAdvance, trySplit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Spliterator
getComparator, getExactSizeIfKnown, hasCharacteristics
-
Constructor Details
-
FlatMapSpliteratorOfObject
FlatMapSpliteratorOfObject(@CheckForNull Spliterator<OutElementT> prefix, Spliterator<InElementT> from, Function<? super InElementT, Spliterator<OutElementT>> function, int characteristics, long estimatedSize)
-