public abstract class AbstractScoreHolder extends Object implements ScoreHolder, Serializable
ScoreHolder.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
constraintMatchEnabled |
protected Map<String,ConstraintMatchTotal> |
constraintMatchTotalMap |
protected Score |
zeroScore |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractScoreHolder(boolean constraintMatchEnabled,
Score zeroScore) |
| Modifier and Type | Method and Description |
|---|---|
Collection<ConstraintMatchTotal> |
getConstraintMatchTotals()
Explains the
Score of ScoreHolder.extractScore(int). |
boolean |
isConstraintMatchEnabled()
Must be in sync with
ScoreDirector.isConstraintMatchEnabled()
for the ScoreDirector which contains this ScoreHolder. |
protected void |
registerConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
Runnable constraintUndoListener,
Supplier<Score> scoreSupplier) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitextractScoreprotected final boolean constraintMatchEnabled
protected final Map<String,ConstraintMatchTotal> constraintMatchTotalMap
protected final Score zeroScore
protected AbstractScoreHolder(boolean constraintMatchEnabled,
Score zeroScore)
public boolean isConstraintMatchEnabled()
ScoreHolderScoreDirector.isConstraintMatchEnabled()
for the ScoreDirector which contains this ScoreHolder.
Defaults to true.
isConstraintMatchEnabled in interface ScoreHolderConstraintMatchs and ConstraintMatchTotals do not need to be collected
which is a performance boostScoreHolder.getConstraintMatchTotals()public Collection<ConstraintMatchTotal> getConstraintMatchTotals()
ScoreHolderScore of ScoreHolder.extractScore(int).
Should not be called directly, use ScoreDirector.getConstraintMatchTotals() instead.
getConstraintMatchTotals in interface ScoreHolderCopyright © 2006–2017 JBoss by Red Hat. All rights reserved.