Class 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:
    java.util.Spliterator<OutElementT>
    Enclosing class:
    CollectSpliterators

    static final class CollectSpliterators.FlatMapSpliteratorOfObject<InElementT,​OutElementT>
    extends CollectSpliterators.FlatMapSpliterator<InElementT,​OutElementT,​java.util.Spliterator<OutElementT>>
    Implementation of 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.

    • Constructor Detail

      • FlatMapSpliteratorOfObject

        FlatMapSpliteratorOfObject​(@CheckForNull
                                   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)