public final class ConstraintMatchTotal extends Object implements Serializable, Comparable<ConstraintMatchTotal>
Score
of a PlanningSolution
, from the opposite side than Indictment
.
Retrievable from ScoreDirector.getConstraintMatchTotalMap()
.Constructor and Description |
---|
ConstraintMatchTotal(String constraintPackage,
String constraintName,
Score zeroScore) |
ConstraintMatchTotal(String constraintPackage,
String constraintName,
Score constraintWeight,
Score zeroScore) |
Modifier and Type | Method and Description |
---|---|
ConstraintMatch |
addConstraintMatch(List<Object> justificationList,
Score score) |
int |
compareTo(ConstraintMatchTotal other) |
static String |
composeConstraintId(String constraintPackage,
String constraintName) |
boolean |
equals(Object o) |
String |
getConstraintId()
To create a constraintId, use
composeConstraintId(String, String) . |
int |
getConstraintMatchCount() |
Set<ConstraintMatch> |
getConstraintMatchSet() |
String |
getConstraintName() |
String |
getConstraintPackage() |
Score |
getConstraintWeight()
The value of the
ConstraintWeight annotated member of the ConstraintConfiguration . |
Score |
getScore()
Sum of the
getConstraintMatchSet() 's ConstraintMatch.getScore() . |
Score |
getScoreTotal()
Deprecated.
in favor of
getScore() |
int |
hashCode() |
void |
removeConstraintMatch(ConstraintMatch constraintMatch) |
String |
toString() |
public ConstraintMatchTotal(String constraintPackage, String constraintName, Score zeroScore)
constraintPackage
- never nullconstraintName
- never nullzeroScore
- never nullpublic ConstraintMatchTotal(String constraintPackage, String constraintName, Score constraintWeight, Score zeroScore)
constraintPackage
- never nullconstraintName
- never nullconstraintWeight
- null if ConstraintWeight
isn't used for this constraintzeroScore
- never nullpublic static String composeConstraintId(String constraintPackage, String constraintName)
constraintPackage
- never nullconstraintName
- never nullpublic String getConstraintPackage()
public String getConstraintName()
public Score getConstraintWeight()
ConstraintWeight
annotated member of the ConstraintConfiguration
.
It's independent to the state of the planning variables
.
Do not confuse with getScore()
.ConstraintWeight
isn't used for this constraintpublic Set<ConstraintMatch> getConstraintMatchSet()
public int getConstraintMatchCount()
>= 0
public Score getScore()
getConstraintMatchSet()
's ConstraintMatch.getScore()
.@Deprecated public Score getScoreTotal()
getScore()
public ConstraintMatch addConstraintMatch(List<Object> justificationList, Score score)
public void removeConstraintMatch(ConstraintMatch constraintMatch)
public String getConstraintId()
composeConstraintId(String, String)
.public int compareTo(ConstraintMatchTotal other)
compareTo
in interface Comparable<ConstraintMatchTotal>
Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.