Interface QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_>
- Type Parameters:
A- the type of the first fact of the tuple in the sourceQuadConstraintStreamB- the type of the second fact of the tuple in the sourceQuadConstraintStreamC- the type of the third fact of the tuple in the sourceQuadConstraintStreamD- the type of the fourth fact of the tuple in the sourceQuadConstraintStreamResultContainer_- the mutable accumulation type (often hidden as an implementation detail)Result_- the type of the fact of the tuple in the destinationConstraintStreamIt is recommended that this type be deeply immutable. Not following this recommendation may lead to hard-to-debug hashing issues down the stream, especially if this value is ever used as a group key.
public interface QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_>
As described by
UniConstraintCollector, only for QuadConstraintStream.- See Also:
-
Method Summary
Modifier and TypeMethodDescription@NonNull PentaFunction<ResultContainer_,A, B, C, D, Runnable> A lambda that extracts data from the matched facts, accumulates it in the result container and returns an undo operation for that accumulation.@NonNull Function<ResultContainer_,Result_> finisher()A lambda that converts the result container into the result.@NonNull Supplier<ResultContainer_>supplier()A lambda that creates the result container, one for each group key combination.
-
Method Details
-
supplier
@NonNull Supplier<ResultContainer_> supplier()A lambda that creates the result container, one for each group key combination. -
accumulator
@NonNull PentaFunction<ResultContainer_,A, accumulator()B, C, D, Runnable> A lambda that extracts data from the matched facts, accumulates it in the result container and returns an undo operation for that accumulation.- Returns:
- the undo operation. This lambda is called when the facts no longer matches.
-
finisher
@NonNull Function<ResultContainer_,Result_> finisher()A lambda that converts the result container into the result.
-