Class JustificationsSupplier

java.lang.Object
org.optaplanner.constraint.streams.common.inliner.JustificationsSupplier

public final class JustificationsSupplier extends Object
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 Type
    Method
    Description
    org.optaplanner.core.api.score.stream.ConstraintJustification
    createConstraintJustification(org.optaplanner.core.api.score.Score<?> impact)
     
     
     
    of(org.optaplanner.core.api.score.stream.Constraint constraint, BiFunction<A,org.optaplanner.core.api.score.Score<?>,org.optaplanner.core.api.score.stream.ConstraintJustification> justificationMapping, Function<A,Collection<Object>> indictedObjectsMapping, A a)
     
    static <A, B, C, D> JustificationsSupplier
    of(org.optaplanner.core.api.score.stream.Constraint constraint, org.optaplanner.core.api.function.PentaFunction<A,B,C,D,org.optaplanner.core.api.score.Score<?>,org.optaplanner.core.api.score.stream.ConstraintJustification> justificationMapping, org.optaplanner.core.api.function.QuadFunction<A,B,C,D,Collection<Object>> indictedObjectsMapping, A a, B b, C c, D d)
     
    static <A, B, C> JustificationsSupplier
    of(org.optaplanner.core.api.score.stream.Constraint constraint, org.optaplanner.core.api.function.QuadFunction<A,B,C,org.optaplanner.core.api.score.Score<?>,org.optaplanner.core.api.score.stream.ConstraintJustification> justificationMapping, org.optaplanner.core.api.function.TriFunction<A,B,C,Collection<Object>> indictedObjectsMapping, A a, B b, C c)
     
    static <A, B> JustificationsSupplier
    of(org.optaplanner.core.api.score.stream.Constraint constraint, org.optaplanner.core.api.function.TriFunction<A,B,org.optaplanner.core.api.score.Score<?>,org.optaplanner.core.api.score.stream.ConstraintJustification> justificationMapping, BiFunction<A,B,Collection<Object>> indictedObjectsMapping, A a, B b)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • empty

      public static JustificationsSupplier empty()
    • of

      public static <A> JustificationsSupplier of(org.optaplanner.core.api.score.stream.Constraint constraint, BiFunction<A,org.optaplanner.core.api.score.Score<?>,org.optaplanner.core.api.score.stream.ConstraintJustification> justificationMapping, Function<A,Collection<Object>> indictedObjectsMapping, A a)
    • of

      public static <A, B> JustificationsSupplier of(org.optaplanner.core.api.score.stream.Constraint constraint, org.optaplanner.core.api.function.TriFunction<A,B,org.optaplanner.core.api.score.Score<?>,org.optaplanner.core.api.score.stream.ConstraintJustification> justificationMapping, BiFunction<A,B,Collection<Object>> indictedObjectsMapping, A a, B b)
    • of

      public static <A, B, C> JustificationsSupplier of(org.optaplanner.core.api.score.stream.Constraint constraint, org.optaplanner.core.api.function.QuadFunction<A,B,C,org.optaplanner.core.api.score.Score<?>,org.optaplanner.core.api.score.stream.ConstraintJustification> justificationMapping, org.optaplanner.core.api.function.TriFunction<A,B,C,Collection<Object>> indictedObjectsMapping, A a, B b, C c)
    • of

      public static <A, B, C, D> JustificationsSupplier of(org.optaplanner.core.api.score.stream.Constraint constraint, org.optaplanner.core.api.function.PentaFunction<A,B,C,D,org.optaplanner.core.api.score.Score<?>,org.optaplanner.core.api.score.stream.ConstraintJustification> justificationMapping, org.optaplanner.core.api.function.QuadFunction<A,B,C,D,Collection<Object>> indictedObjectsMapping, A a, B b, C c, D d)
    • createConstraintJustification

      public org.optaplanner.core.api.score.stream.ConstraintJustification createConstraintJustification(org.optaplanner.core.api.score.Score<?> impact)
    • createIndictedObjects

      public Collection<Object> createIndictedObjects()