A - the type of the first fact of the tuple in the source BiConstraintStreamB - the type of the second fact of the tuple in the source BiConstraintStreamResultContainer_ - the mutable accumulation type (often hidden as an implementation detail)Result_ - the type of the fact of the tuple in the destination ConstraintStreampublic interface BiConstraintCollector<A,B,ResultContainer_,Result_>
ConstraintCollectors.
Used by BiConstraintStream.groupBy(BiFunction, BiConstraintCollector), ...
Loosely based on JDK's Collector, but it returns an undo operation for each accumulation
to enable incremental score calculation in constraint streams.
ConstraintCollectors| Modifier and Type | Method and Description |
|---|---|
TriFunction<ResultContainer_,A,B,Runnable> |
accumulator()
A lambda that extracts data from the matched facts,
accumulates it in the result container
and returns an undo operation for that accumulation.
|
Function<ResultContainer_,Result_> |
finisher()
A lambda that converts the result container into the result.
|
Supplier<ResultContainer_> |
supplier()
A lambda that creates the result container, one for each group key combination.
|
Supplier<ResultContainer_> supplier()
TriFunction<ResultContainer_,A,B,Runnable> accumulator()
Function<ResultContainer_,Result_> finisher()
Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.