com.hazelcast.jet.aggregate

## Class AggregateOperationBuilder.VarArity<A,R>

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

- Type Parameters:
    `A` - the type of the accumulator
    `R` - type of the aggregation result
  Enclosing class:
    AggregateOperationBuilder<A>

      public static class AggregateOperationBuilder.VarArity<A,R>
      extends Object

  The variable-arity variant of the aggregate operation builder. Accepts any number of `accumulate` primitives and associates them with `Tag`s. Does not capture the static type of the stream items.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> AggregateOperationBuilder.VarArity<A,R>` | `andAccumulate(Tag<T> tag, BiConsumerEx<? super A,T> accumulateFn)` Registers the supplied `accumulate` primitive for the stream tagged with the supplied tag.
    `AggregateOperationBuilder.VarArity<A,R>` | `andCombine(BiConsumerEx<? super A,? super A> combineFn)` Registers the `combine` primitive.
    `AggregateOperationBuilder.VarArity<A,R>` | `andDeduct(BiConsumerEx<? super A,? super A> deductFn)` Registers the `deduct` primitive.
    `<R_NEW> AggregateOperationBuilder.VarArity<A,R_NEW>` | `andExport(FunctionEx<? super A,? extends R_NEW> exportFn)` Registers the `export` primitive.
    `<R_NEW> AggregateOperation<A,R_NEW>` | `andExportFinish(FunctionEx<? super A,? extends R_NEW> exportFinishFn)` Registers the supplied function as both the `export` and `finish` primitive.
    `AggregateOperation<A,R>` | `andFinish(FunctionEx<? super A,? extends R> finishFn)` Registers the supplied function as the `finish` primitive.

    - ### 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.VarArity<A,R> andAccumulate(@Nonnull
                                                                                    Tag<T> tag,
                                                                                    @Nonnull
                                                                                    BiConsumerEx<? super A,T> accumulateFn)

      Registers the supplied `accumulate` primitive for the stream tagged with the supplied tag.
      Type Parameters:
        `T` - the expected type of input item
      Parameters:
        `tag` - the tag of the associated input stream
        `accumulateFn` - the `accumulate` primitive
      Returns:
        this

    - #### andCombine

          @Nonnull
          public AggregateOperationBuilder.VarArity<A,R> andCombine(@Nullable
                                                                             BiConsumerEx<? super A,? super A> combineFn)

      Registers the `combine` primitive.

    - #### andDeduct

          @Nonnull
          public AggregateOperationBuilder.VarArity<A,R> andDeduct(@Nullable
                                                                            BiConsumerEx<? super A,? super A> deductFn)

      Registers the `deduct` primitive.

    - #### andExport

          @Nonnull
          public <R_NEW> AggregateOperationBuilder.VarArity<A,R_NEW> andExport(@Nonnull
                                                                                        FunctionEx<? super A,? extends R_NEW> exportFn)

      Registers the `export` primitive.

    - #### andFinish

          @Nonnull
          public AggregateOperation<A,R> andFinish(@Nonnull
                                                            FunctionEx<? super A,? extends R> finishFn)

      Registers the supplied function as the `finish` primitive. Constructs and returns an `AggregateOperation1` from the current state of the builder.
      Throws:
        `IllegalStateException` - if the `export` primitive was not registered

    - #### andExportFinish

          @Nonnull
          public <R_NEW> AggregateOperation<A,R_NEW> andExportFinish(@Nonnull
                                                                              FunctionEx<? super A,? extends R_NEW> exportFinishFn)

      Registers the supplied function as both the `export` and `finish` primitive. Constructs and returns an `AggregateOperation1` from the current state of the builder.
      Throws:
        `IllegalStateException` - if the `export` primitive is already registered

Copyright © 2019. All rights reserved.