Class DefaultConstraintMatchTotal<Score_ extends Score<Score_>>
java.lang.Object
org.optaplanner.core.impl.score.constraint.DefaultConstraintMatchTotal<Score_>
- All Implemented Interfaces:
- Comparable<DefaultConstraintMatchTotal<Score_>>,- ConstraintMatchTotal<Score_>
public final class DefaultConstraintMatchTotal<Score_ extends Score<Score_>>
extends Object
implements ConstraintMatchTotal<Score_>, Comparable<DefaultConstraintMatchTotal<Score_>>
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultConstraintMatchTotal(String constraintPackage, String constraintName) DefaultConstraintMatchTotal(String constraintPackage, String constraintName, Score_ constraintWeight) 
- 
Method SummaryModifier and TypeMethodDescriptionaddConstraintMatch(List<Object> justifications, Score_ score) Creates aConstraintMatchand adds it to the collection returned bygetConstraintMatchSet().addConstraintMatch(ConstraintJustification justification, Collection<Object> indictedObjects, Score_ score) Creates aConstraintMatchand adds it to the collection returned bygetConstraintMatchSet().intbooleanTo create a constraintId, useConstraintMatchTotal.composeConstraintId(String, String).The value of theConstraintWeightannotated member of theConstraintConfiguration.getScore()inthashCode()voidremoveConstraintMatch(ConstraintMatch<Score_> constraintMatch) toString()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.optaplanner.core.api.score.constraint.ConstraintMatchTotalgetConstraintMatchCount
- 
Constructor Details- 
DefaultConstraintMatchTotal
- 
DefaultConstraintMatchTotal
 
- 
- 
Method Details- 
getConstraintPackage- Specified by:
- getConstraintPackagein interface- ConstraintMatchTotal<Score_ extends Score<Score_>>
- Returns:
- never null
 
- 
getConstraintName- Specified by:
- getConstraintNamein interface- ConstraintMatchTotal<Score_ extends Score<Score_>>
- Returns:
- never null
 
- 
getConstraintWeightDescription copied from interface:ConstraintMatchTotalThe value of theConstraintWeightannotated member of theConstraintConfiguration. It's independent to the state of theplanning variables. Do not confuse withConstraintMatchTotal.getScore().- Specified by:
- getConstraintWeightin interface- ConstraintMatchTotal<Score_ extends Score<Score_>>
- Returns:
- null if ConstraintWeightisn't used for this constraint
 
- 
getConstraintMatchSet- Specified by:
- getConstraintMatchSetin interface- ConstraintMatchTotal<Score_ extends Score<Score_>>
- Returns:
- never null
 
- 
getScoreDescription copied from interface:ConstraintMatchTotal- Specified by:
- getScorein interface- ConstraintMatchTotal<Score_ extends Score<Score_>>
- Returns:
- never null
 
- 
addConstraintMatchCreates aConstraintMatchand adds it to the collection returned bygetConstraintMatchSet(). It will useDefaultConstraintJustification, whoseDefaultConstraintJustification.getFacts()method will return the given list of justifications. Additionally, the constraint match will indict the objects in the given list of justifications.- Parameters:
- justifications- never null, never empty
- score- never null
- Returns:
- never null
 
- 
addConstraintMatchpublic ConstraintMatch<Score_> addConstraintMatch(ConstraintJustification justification, Collection<Object> indictedObjects, Score_ score) Creates aConstraintMatchand adds it to the collection returned bygetConstraintMatchSet(). It will the providedConstraintJustification. Additionally, the constraint match will indict the objects in the given list of indicted objects.- Parameters:
- indictedObjects- never null, may be empty
- score- never null
- Returns:
- never null
 
- 
removeConstraintMatch
- 
getConstraintIdDescription copied from interface:ConstraintMatchTotalTo create a constraintId, useConstraintMatchTotal.composeConstraintId(String, String).- Specified by:
- getConstraintIdin interface- ConstraintMatchTotal<Score_ extends Score<Score_>>
- Returns:
- never null
 
- 
compareTo- Specified by:
- compareToin interface- Comparable<Score_ extends Score<Score_>>
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-