Class AbstractScoreInliner<Score_ extends Score<Score_>>
- java.lang.Object
-
- org.optaplanner.core.impl.score.stream.common.inliner.AbstractScoreInliner<Score_>
-
- Direct Known Subclasses:
BendableLongScoreInliner
public abstract class AbstractScoreInliner<Score_ extends Score<Score_>> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
constraintMatchEnabled
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractScoreInliner(Map<Constraint,Score_> constraintToWeightMap, boolean constraintMatchEnabled)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Runnable
addConstraintMatch(Constraint constraint, Score_ constraintWeight, Score_ score, List<Object> justificationList)
static <Score_ extends Score<Score_>,ScoreInliner_ extends AbstractScoreInliner<Score_>>
ScoreInliner_buildScoreInliner(ScoreDefinition<Score_> scoreDefinition, Map<Constraint,Score_> constraintIdToWeightMap, boolean constraintMatchEnabled)
abstract WeightedScoreImpacter
buildWeightedScoreImpacter(Constraint constraint)
Create a new instance ofWeightedScoreImpacter
for a particular constraint.abstract Score_
extractScore(int initScore)
Map<String,ConstraintMatchTotal<Score_>>
getConstraintMatchTotalMap()
protected Score_
getConstraintWeight(Constraint constraint)
Map<Object,Indictment<Score_>>
getIndictmentMap()
-
-
-
Constructor Detail
-
AbstractScoreInliner
protected AbstractScoreInliner(Map<Constraint,Score_> constraintToWeightMap, boolean constraintMatchEnabled)
-
-
Method Detail
-
buildScoreInliner
public static <Score_ extends Score<Score_>,ScoreInliner_ extends AbstractScoreInliner<Score_>> ScoreInliner_ buildScoreInliner(ScoreDefinition<Score_> scoreDefinition, Map<Constraint,Score_> constraintIdToWeightMap, boolean constraintMatchEnabled)
-
extractScore
public abstract Score_ extractScore(int initScore)
-
buildWeightedScoreImpacter
public abstract WeightedScoreImpacter buildWeightedScoreImpacter(Constraint constraint)
Create a new instance ofWeightedScoreImpacter
for a particular constraint.- Parameters:
constraint
- never null- Returns:
- never null
-
addConstraintMatch
protected final Runnable addConstraintMatch(Constraint constraint, Score_ constraintWeight, Score_ score, List<Object> justificationList)
-
getConstraintMatchTotalMap
public final Map<String,ConstraintMatchTotal<Score_>> getConstraintMatchTotalMap()
-
getIndictmentMap
public final Map<Object,Indictment<Score_>> getIndictmentMap()
-
getConstraintWeight
protected final Score_ getConstraintWeight(Constraint constraint)
-
-