org.optaplanner.core.impl.score.stream.quad

## Class DefaultQuadConstraintCollector<A,B,C,D,ResultContainer_,Result_>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.quad.DefaultQuadConstraintCollector<A,B,C,D,ResultContainer_,Result_>

- All Implemented Interfaces:
    QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_>

      public final class DefaultQuadConstraintCollector<A,B,C,D,ResultContainer_,Result_>
      extends Object
      implements QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultQuadConstraintCollector(Supplier<ResultContainer_> supplier, PentaFunction<ResultContainer_,A,B,C,D,Runnable> accumulator, Function<ResultContainer_,Result_> finisher)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PentaFunction<ResultContainer_,A,B,C,D,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.
    `static <A,B,C,D,Result_> QuadConstraintCollector<A,B,C,D,?,Result_>` | `noop()`
    `Supplier<ResultContainer_>` | `supplier()` A lambda that creates the result container, one for each group key combination.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultQuadConstraintCollector

          public DefaultQuadConstraintCollector(Supplier<ResultContainer_> supplier,
                                                PentaFunction<ResultContainer_,A,B,C,D,Runnable> accumulator,
                                                Function<ResultContainer_,Result_> finisher)

  - ### Method Detail

    - #### noop

          public static <A,B,C,D,Result_> QuadConstraintCollector<A,B,C,D,?,Result_> noop()

    - #### supplier

          public Supplier<ResultContainer_> supplier()

      Description copied from interface: `QuadConstraintCollector`
      A lambda that creates the result container, one for each group key combination.
      Specified by:
        `supplier` in interface `QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_>`
      Returns:
        never null

    - #### accumulator

          public PentaFunction<ResultContainer_,A,B,C,D,Runnable> accumulator()

      Description copied from interface: `QuadConstraintCollector`
      A lambda that extracts data from the matched facts, accumulates it in the result container and returns an undo operation for that accumulation.
      Specified by:
        `accumulator` in interface `QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_>`
      Returns:
        never null, the undo operation. This lamdba is called when the facts no longer matches.

    - #### finisher

          public Function<ResultContainer_,Result_> finisher()

      Description copied from interface: `QuadConstraintCollector`
      A lambda that converts the result container into the result.
      Specified by:
        `finisher` in interface `QuadConstraintCollector<A,B,C,D,ResultContainer_,Result_>`
      Returns:
        never null

Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.