Class MultiOnItemGather.InitialAccumulatorStep<I,ACC>

java.lang.Object
io.smallrye.mutiny.groups.MultiOnItemGather.InitialAccumulatorStep<I,ACC>
Type Parameters:
I - the type of the items emitted by the upstream Multi
ACC - the type of the accumulator
Enclosing class:
MultiOnItemGather<I>

public static class MultiOnItemGather.InitialAccumulatorStep<I,ACC> extends Object
The first step in the builder to gather items emitted by a Multi into an accumulator.
  • Method Details

    • accumulate

      @CheckReturnValue public MultiOnItemGather.ExtractStep<I,ACC> accumulate(BiFunction<ACC,I,ACC> accumulator)
      Specifies the accumulator function.

      The accumulator function is used to accumulate the items emitted by the upstream.

      Parameters:
      accumulator - the accumulator function, which takes the current accumulator and the item emitted by the upstream, and returns the new accumulator
      Returns:
      the next step in the builder