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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.optaplanner.core.api.score.stream.ConstraintJustificationcreateConstraintJustification(org.optaplanner.core.api.score.Score<?> impact)Collection<Object>createIndictedObjects()static JustificationsSupplierempty()static JustificationsSupplierof(Function<org.optaplanner.core.api.score.Score<?>,org.optaplanner.core.api.score.stream.ConstraintJustification> constraintJustificationSupplier, Supplier<Collection<Object>> indictedObjectsSupplier)
-
-
-
Method Detail
-
empty
public static JustificationsSupplier empty()
-
of
public static JustificationsSupplier of(Function<org.optaplanner.core.api.score.Score<?>,org.optaplanner.core.api.score.stream.ConstraintJustification> constraintJustificationSupplier, Supplier<Collection<Object>> indictedObjectsSupplier)
-
createConstraintJustification
public org.optaplanner.core.api.score.stream.ConstraintJustification createConstraintJustification(org.optaplanner.core.api.score.Score<?> impact)
-
createIndictedObjects
public Collection<Object> createIndictedObjects()
-
-