com.hazelcast.jet.aggregate

## Interface AggregateOperation1<T,A,R>

- Type Parameters:
    `T` - the type of the stream item
    `A` - the type of the accumulator
    `R` - the type of the aggregation result
  All Superinterfaces:
    AggregateOperation<A,R>, Serializable

      public interface AggregateOperation1<T,A,R>
      extends AggregateOperation<A,R>

  Specialization of `AggregateOperation` (refer to its extensive documentation) to the "arity-1" case with a single data stream being aggregated over. `AggregateOperations` contains factories for the built-in implementations and you can create your own using the aggregate operation builder.
  Since:
    3.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `BiConsumerEx<? super A,? super T>` | `accumulateFn()` A primitive that updates the accumulator state to account for a new item.
    `<R_NEW> AggregateOperation1<T,A,R_NEW>` | `andThen(FunctionEx<? super R,? extends R_NEW> thenFn)` Returns a copy of this aggregate operation, but with the `export` and `finish` primitives composed with the supplied `thenFn`.
    `default Collector<T,A,R>` | `toCollector()` Deprecated. see AggregateOperations.toCollector(AggregateOperation1)
    `<NEW_T> AggregateOperation1<NEW_T,A,R>` | `withAccumulateFn(BiConsumerEx<? super A,? super NEW_T> accumulateFn)` Returns a copy of this aggregate operation, but with the `accumulate` primitive replaced with the one supplied here.
    `AggregateOperation1<T,A,A>` | `withIdentityFinish()` Returns a copy of this aggregate operation, but with the `finish` primitive replaced with the identity function.

    - ### Methods inherited from interface com.hazelcast.jet.aggregate.AggregateOperation

      `accumulateFn, accumulateFn, arity, combineFn, createFn, deductFn, exportFn, finishFn, withAccumulateFns, withCombiningAccumulateFn, withCreate`

- - ### Method Detail

    - #### accumulateFn

          @Nonnull
          BiConsumerEx<? super A,? super T> accumulateFn()

      A primitive that updates the accumulator state to account for a new item.

    - #### withAccumulateFn

          @Nonnull
          <NEW_T> AggregateOperation1<NEW_T,A,R> withAccumulateFn(BiConsumerEx<? super A,? super NEW_T> accumulateFn)

      Returns a copy of this aggregate operation, but with the `accumulate` primitive replaced with the one supplied here.

    - #### withIdentityFinish

          @Nonnull
          AggregateOperation1<T,A,A> withIdentityFinish()

      Description copied from interface: `AggregateOperation`
      Returns a copy of this aggregate operation, but with the `finish` primitive replaced with the identity function. It will return the accumulator object as-is. The returned aggregate operation does not support the `export` primitive.
      Specified by:
        `withIdentityFinish` in interface `AggregateOperation<A,R>`

    - #### andThen

          @Nonnull
          <R_NEW> AggregateOperation1<T,A,R_NEW> andThen(FunctionEx<? super R,? extends R_NEW> thenFn)

      Description copied from interface: `AggregateOperation`
      Returns a copy of this aggregate operation, but with the `export` and `finish` primitives composed with the supplied `thenFn`. This replaces `exportFn` with `exportFn.andThen(thenFn)`, same for `finishFn`. The main use case is to transform the result of an existing (library-provided) aggregate operation.
      Specified by:
        `andThen` in interface `AggregateOperation<A,R>`
      Type Parameters:
        `R_NEW` - the type of the returned aggregate operation's result
      Parameters:
        `thenFn` - the function to apply to the results of `export` and `finish` primitives

    - #### toCollector

          @Nonnull
           @Deprecated
          default Collector<T,A,R> toCollector()

      Deprecated. see AggregateOperations.toCollector(AggregateOperation1)

Copyright © 2019. All rights reserved.