Interface UniConstraintCollector<A,​ResultContainer_,​Result_>

    • Method Detail

      • supplier

        Supplier<ResultContainer_> supplier()
        A lambda that creates the result container, one for each group key combination.
        Returns:
        never null
      • accumulator

        BiFunction<ResultContainer_,​A,​Runnable> accumulator()
        A lambda that extracts data from the matched fact, accumulates it in the result container and returns an undo operation for that accumulation.
        Returns:
        never null, the undo operation. This lambda is called when the fact no longer matches.
      • finisher

        Function<ResultContainer_,​Result_> finisher()
        A lambda that converts the result container into the result.
        Returns:
        null when the result would be invalid, such as maximum value from an empty container.