Interface Stage.Collect

  • All Superinterfaces:
    Enclosing interface:

    public static interface Stage.Collect
    extends Stage
    A collect stage.

    This must use the collectors supplier to create an accumulated value, and then the accumulator BiConsumer must be used to accumulate the received elements in the value. Finally, the returned CompletionStage must be redeemed by value returned by the finisher function applied to the accumulated value when the stream terminates normally, or must be redeemed with an error if the stream terminates with an error.

    If the collector throws an exception, the upstream must be cancelled, and the CompletionStage must be redeemed with that error.

    • Method Detail

      • getCollector<?,?,?> getCollector​()
        The collector.
        The collector.