Package com.hazelcast.jet.aggregate
Class AggregateOperationBuilder.Arity1<T0,A,R>
java.lang.Object
com.hazelcast.jet.aggregate.AggregateOperationBuilder.Arity1<T0,A,R>
- Type Parameters:
T0
- type of item in stream-0A
- type of the accumulatorR
- type of the aggregation result
- Enclosing class:
- AggregateOperationBuilder<A>
public static class AggregateOperationBuilder.Arity1<T0,A,R> extends Object
The arity-1 variant of the aggregate operation builder. Can be
raised to arity-2 by calling
andAccumulate1()
.-
Method Summary
Modifier and Type Method Description <T1> AggregateOperationBuilder.Arity2<T0,T1,A,R>
andAccumulate1(BiConsumerEx<? super A,? super T1> accumulateFn1)
Registers the suppliedaccumulate
primitive for stream-1, returning the arity-2 variant of the builder.AggregateOperationBuilder.Arity1<T0,A,R>
andCombine(BiConsumerEx<? super A,? super A> combineFn)
Registers thecombine
primitive.AggregateOperationBuilder.Arity1<T0,A,R>
andDeduct(BiConsumerEx<? super A,? super A> deductFn)
Registers thededuct
primitive.<R_NEW> AggregateOperationBuilder.Arity1<T0,A,R_NEW>
andExport(FunctionEx<? super A,? extends R_NEW> exportFn)
Registers theexport
primitive.<R_NEW> AggregateOperation1<T0,A,R_NEW>
andExportFinish(FunctionEx<? super A,? extends R_NEW> exportFinishFn)
Registers the supplied function as both theexport
andfinish
primitive.AggregateOperation1<T0,A,R>
andFinish(FunctionEx<? super A,? extends R> finishFn)
Registers the supplied function as thefinish
primitive.
-
Method Details
-
andAccumulate1
@Nonnull public <T1> AggregateOperationBuilder.Arity2<T0,T1,A,R> andAccumulate1(@Nonnull BiConsumerEx<? super A,? super T1> accumulateFn1)Registers the suppliedaccumulate
primitive for stream-1, returning the arity-2 variant of the builder.- Type Parameters:
T1
- the expected type of item in stream-1- Parameters:
accumulateFn1
- theaccumulate
primitive for stream-1- Returns:
- a new builder object that captures the
T1
type parameter
-
andCombine
@Nonnull public AggregateOperationBuilder.Arity1<T0,A,R> andCombine(@Nullable BiConsumerEx<? super A,? super A> combineFn)Registers thecombine
primitive. -
andDeduct
@Nonnull public AggregateOperationBuilder.Arity1<T0,A,R> andDeduct(@Nullable BiConsumerEx<? super A,? super A> deductFn)Registers thededuct
primitive. -
andExport
@Nonnull public <R_NEW> AggregateOperationBuilder.Arity1<T0,A,R_NEW> andExport(@Nonnull FunctionEx<? super A,? extends R_NEW> exportFn)Registers theexport
primitive. -
andFinish
@Nonnull public AggregateOperation1<T0,A,R> andFinish(@Nonnull FunctionEx<? super A,? extends R> finishFn)Registers the supplied function as thefinish
primitive. Constructs and returns anAggregateOperation1
from the current state of the builder.- Throws:
IllegalStateException
- if theexport
primitive was not registered
-
andExportFinish
@Nonnull public <R_NEW> AggregateOperation1<T0,A,R_NEW> andExportFinish(@Nonnull FunctionEx<? super A,? extends R_NEW> exportFinishFn)Registers the supplied function as both theexport
andfinish
primitive. Constructs and returns anAggregateOperation1
from the current state of the builder.- Throws:
IllegalStateException
- if theexport
primitive is already registered
-