Class ConstraintMatchTotal
- java.lang.Object
- 
- org.optaplanner.core.api.score.constraint.ConstraintMatchTotal
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<ConstraintMatchTotal>
 
 public final class ConstraintMatchTotal extends Object implements Serializable, Comparable<ConstraintMatchTotal> Explains theScoreof aPlanningSolution, from the opposite side thanIndictment. Retrievable fromScoreDirector.getConstraintMatchTotalMap().- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description ConstraintMatchTotal(String constraintPackage, String constraintName, Score zeroScore)ConstraintMatchTotal(String constraintPackage, String constraintName, Score constraintWeight, Score zeroScore)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ConstraintMatchaddConstraintMatch(List<Object> justificationList, Score score)intcompareTo(ConstraintMatchTotal other)static StringcomposeConstraintId(String constraintPackage, String constraintName)booleanequals(Object o)StringgetConstraintId()To create a constraintId, usecomposeConstraintId(String, String).intgetConstraintMatchCount()Set<ConstraintMatch>getConstraintMatchSet()StringgetConstraintName()StringgetConstraintPackage()ScoregetConstraintWeight()The value of theConstraintWeightannotated member of theConstraintConfiguration.ScoregetScore()Sum of thegetConstraintMatchSet()'sConstraintMatch.getScore().ScoregetScoreTotal()Deprecated.in favor ofgetScore()inthashCode()voidremoveConstraintMatch(ConstraintMatch constraintMatch)StringtoString()
 
- 
- 
- 
Constructor Detail- 
ConstraintMatchTotalpublic ConstraintMatchTotal(String constraintPackage, String constraintName, Score zeroScore) - Parameters:
- constraintPackage- never null
- constraintName- never null
- zeroScore- never null
 
 - 
ConstraintMatchTotalpublic ConstraintMatchTotal(String constraintPackage, String constraintName, Score constraintWeight, Score zeroScore) - Parameters:
- constraintPackage- never null
- constraintName- never null
- constraintWeight- null if- ConstraintWeightisn't used for this constraint
- zeroScore- never null
 
 
- 
 - 
Method Detail- 
composeConstraintIdpublic static String composeConstraintId(String constraintPackage, String constraintName) - Parameters:
- constraintPackage- never null
- constraintName- never null
- Returns:
- never null
 
 - 
getConstraintPackagepublic String getConstraintPackage() - Returns:
- never null
 
 - 
getConstraintNamepublic String getConstraintName() - Returns:
- never null
 
 - 
getConstraintWeightpublic Score getConstraintWeight() The value of theConstraintWeightannotated member of theConstraintConfiguration. It's independent to the state of theplanning variables. Do not confuse withgetScore().- Returns:
- null if ConstraintWeightisn't used for this constraint
 
 - 
getConstraintMatchSetpublic Set<ConstraintMatch> getConstraintMatchSet() - Returns:
- never null
 
 - 
getConstraintMatchCountpublic int getConstraintMatchCount() - Returns:
- >= 0
 
 - 
getScorepublic Score getScore() Sum of thegetConstraintMatchSet()'sConstraintMatch.getScore().- Returns:
- never null
 
 - 
getScoreTotal@Deprecated public Score getScoreTotal() Deprecated.in favor ofgetScore()- Returns:
- never null
 
 - 
addConstraintMatchpublic ConstraintMatch addConstraintMatch(List<Object> justificationList, Score score) 
 - 
removeConstraintMatchpublic void removeConstraintMatch(ConstraintMatch constraintMatch) 
 - 
getConstraintIdpublic String getConstraintId() To create a constraintId, usecomposeConstraintId(String, String).- Returns:
- never null
 
 - 
compareTopublic int compareTo(ConstraintMatchTotal other) - Specified by:
- compareToin interface- Comparable<ConstraintMatchTotal>
 
 
- 
 
-