com.hazelcast.jet.aggregate

## Class AggregateOperationBuilder<A>

- java.lang.Object
- - com.hazelcast.jet.aggregate.AggregateOperationBuilder<A>

- Type Parameters:
    `A` - the type of the accumulator

      public final class AggregateOperationBuilder<A>
      extends Object

  A builder object that can be used to construct the definition of an aggregate operation in a step-by-step manner. Please refer to `AggregateOperation.withCreate()` for more details.
  Since:
    3.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AggregateOperationBuilder.Arity1<T0,A,R>` The arity-1 variant of the aggregate operation builder.
    `static class` | `AggregateOperationBuilder.Arity2<T0,T1,A,R>` The arity-2 variant of the aggregate operation builder.
    `static class` | `AggregateOperationBuilder.Arity3<T0,T1,T2,A,R>` The arity-3 variant of the aggregate operation builder.
    `static class` | `AggregateOperationBuilder.VarArity<A,R>` The variable-arity variant of the aggregate operation builder.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> AggregateOperationBuilder.Arity1<T,A,Void>` | `andAccumulate(BiConsumerEx<? super A,? super T> accumulateFn)` Registers the supplied `accumulate` primitive.
    `<T> AggregateOperationBuilder.VarArity<A,Void>` | `andAccumulate(Tag<T> tag, BiConsumerEx<? super A,? super T> accumulateFn)` Registers the supplied `accumulate` primitive for the stream tagged with the supplied tag.
    `<T0> AggregateOperationBuilder.Arity1<T0,A,Void>` | `andAccumulate0(BiConsumerEx<? super A,? super T0> accumulateFn0)` Registers the supplied `accumulate` primitive for stream-0.
    `AggregateOperationBuilder.VarArity<A,Void>` | `varArity()` Selects the variable-arity variant for this aggregate operation builder.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### andAccumulate

          @Nonnull
          public <T> AggregateOperationBuilder.Arity1<T,A,Void> andAccumulate(@Nonnull
                                                                                       BiConsumerEx<? super A,? super T> accumulateFn)

      Registers the supplied `accumulate` primitive. Also selects the fixed-arity variant of the aggregate operation.

      This method is synonymous with `andAccumulate0( BiConsumerEx)`, but makes more sense when defining a simple, arity-1 aggregate operation.

      Type Parameters:
        `T` - the expected type of input item
      Parameters:
        `accumulateFn` - the `accumulate` primitive, parameters are `(accumulator, item)`
      Returns:
        a new builder object that captures the `T0` type parameter

    - #### andAccumulate0

          @Nonnull
          public <T0> AggregateOperationBuilder.Arity1<T0,A,Void> andAccumulate0(@Nonnull
                                                                                          BiConsumerEx<? super A,? super T0> accumulateFn0)

      Registers the supplied `accumulate` primitive for stream-0. Also selects the fixed-arity variant of the aggregate operation.
      Type Parameters:
        `T0` - the expected type of item in stream-0
      Parameters:
        `accumulateFn0` - the `accumulate` primitive for stream-0
      Returns:
        a new builder object that captures the `T0` type parameter

    - #### varArity

          public AggregateOperationBuilder.VarArity<A,Void> varArity()

      Selects the variable-arity variant for this aggregate operation builder.
      Returns:
        a new builder object for variable-arity aggregate operations which has the `createFn` of the current builder

    - #### andAccumulate

          @Nonnull
          public <T> AggregateOperationBuilder.VarArity<A,Void> andAccumulate(@Nonnull
                                                                                       Tag<T> tag,
                                                                                       @Nonnull
                                                                                       BiConsumerEx<? super A,? super T> accumulateFn)

      Registers the supplied `accumulate` primitive for the stream tagged with the supplied tag. Also selects the variable-arity variant of the aggregate operation.
      Type Parameters:
        `T` - the expected type of input item
      Parameters:
        `tag` - the tag of the associated input stream
        `accumulateFn` - the `accumulate` primitive
      Returns:
        a new builder object for variable-arity aggregate operations which has the `createFn` of the current builder

Copyright © 2019. All rights reserved.