Package 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
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.
 All the functions must be stateless and cooperative.
- Since:
- Jet 3.0
- 
Method SummaryModifier and TypeMethodDescriptionBiConsumerEx<? super A,? super T> 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 theexportandfinishprimitives composed with the suppliedthenFn.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 theaccumulateprimitive replaced with the one supplied here.Returns a copy of this aggregate operation, but with thefinishprimitive replaced with the identity function.Methods inherited from interface com.hazelcast.jet.aggregate.AggregateOperationaccumulateFn, accumulateFn, arity, combineFn, createFn, deductFn, exportFn, finishFn, withAccumulateFns, withCombiningAccumulateFn
- 
Method Details- 
accumulateFnA primitive that updates the accumulator state to account for a new item.The consumer must be stateless and cooperative. 
- 
withAccumulateFn@Nonnull <NEW_T> AggregateOperation1<NEW_T,A, withAccumulateFnR> (BiConsumerEx<? super A, ? super NEW_T> accumulateFn) Returns a copy of this aggregate operation, but with theaccumulateprimitive replaced with the one supplied here.The consumer must be stateless and cooperative. 
- 
withIdentityFinishDescription copied from interface:AggregateOperationReturns a copy of this aggregate operation, but with thefinishprimitive replaced with the identity function. It will return the accumulator object as-is. The returned aggregate operation does not support theexportprimitive.- Specified by:
- withIdentityFinishin interface- AggregateOperation<T,- A> 
 
- 
andThen@Nonnull <R_NEW> AggregateOperation1<T,A, andThenR_NEW> (FunctionEx<? super R, ? extends R_NEW> thenFn) Description copied from interface:AggregateOperationReturns a copy of this aggregate operation, but with theexportandfinishprimitives composed with the suppliedthenFn. This replacesexportFnwithexportFn.andThen(thenFn), same forfinishFn. The main use case is to transform the result of an existing (library-provided) aggregate operation.The given function must be stateless and cooperative. - Specified by:
- andThenin interface- AggregateOperation<T,- A> 
- Type Parameters:
- R_NEW- the type of the returned aggregate operation's result
- Parameters:
- thenFn- the function to apply to the results of- exportand- finishprimitives
 
- 
toCollectorDeprecated.
 
-