Class JustificationsSupplier
java.lang.Object
org.optaplanner.constraint.streams.common.inliner.JustificationsSupplier
Allows to create justifications and indictments lazily if and only if constraint matches are enabled.
Justification and indictment creation is performance expensive and constraint matches are typically disabled.
So justifications and indictments are created lazily, outside of the typical hot path.
-
Method Summary
Modifier and TypeMethodDescriptioncreateConstraintJustification
(Score<?> impact) static JustificationsSupplier
empty()
static <A> JustificationsSupplier
of
(Constraint constraint, BiFunction<A, Score<?>, ConstraintJustification> justificationMapping, Function<A, Collection<Object>> indictedObjectsMapping, A a) static <A,
B, C, D> JustificationsSupplier of
(Constraint constraint, PentaFunction<A, B, C, D, Score<?>, ConstraintJustification> justificationMapping, QuadFunction<A, B, C, D, Collection<Object>> indictedObjectsMapping, A a, B b, C c, D d) static <A,
B, C> JustificationsSupplier of
(Constraint constraint, QuadFunction<A, B, C, Score<?>, ConstraintJustification> justificationMapping, TriFunction<A, B, C, Collection<Object>> indictedObjectsMapping, A a, B b, C c) static <A,
B> JustificationsSupplier of
(Constraint constraint, TriFunction<A, B, Score<?>, ConstraintJustification> justificationMapping, BiFunction<A, B, Collection<Object>> indictedObjectsMapping, A a, B b)
-
Method Details
-
empty
-
of
public static <A> JustificationsSupplier of(Constraint constraint, BiFunction<A, Score<?>, ConstraintJustification> justificationMapping, Function<A, Collection<Object>> indictedObjectsMapping, A a) -
of
public static <A,B> JustificationsSupplier of(Constraint constraint, TriFunction<A, B, Score<?>, ConstraintJustification> justificationMapping, BiFunction<A, B, Collection<Object>> indictedObjectsMapping, A a, B b) -
of
public static <A,B, JustificationsSupplier ofC> (Constraint constraint, QuadFunction<A, B, C, Score<?>, ConstraintJustification> justificationMapping, TriFunction<A, B, C, Collection<Object>> indictedObjectsMapping, A a, B b, C c) -
of
public static <A,B, JustificationsSupplier ofC, D> (Constraint constraint, PentaFunction<A, B, C, D, Score<?>, ConstraintJustification> justificationMapping, QuadFunction<A, B, C, D, Collection<Object>> indictedObjectsMapping, A a, B b, C c, D d) -
createConstraintJustification
-
createIndictedObjects
-