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 spliterator
OutElementT - 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
invalid reference
Stream#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.