Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.0.0.CR4
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.optaplanner.core.api.score.holder
Class AbstractScoreHolder

    java.lang.Object
      org.optaplanner.core.api.score.holder.AbstractScoreHolder

All Implemented Interfaces:
  Serializable, ScoreHolder

Direct Known Subclasses:
  BendableScoreHolder, HardMediumSoftScoreHolder, HardSoftBigDecimalScoreHolder, HardSoftDoubleScoreHolder, HardSoftLongScoreHolder, HardSoftScoreHolder, SimpleBigDecimalScoreHolder, SimpleDoubleScoreHolder, SimpleLongScoreHolder, SimpleScoreHolder

    public abstract class AbstractScoreHolder

extends Object
implements ScoreHolder, Serializable

Abstract superclass for `ScoreHolder`.

See Also:
  Serialized Form

Field Summary
`protected boolean` | `constraintMatchEnabled`
`protected Map<List<Object>,ConstraintMatchTotal>` | `constraintMatchTotalMap`

Constructor Summary
`protected` | `AbstractScoreHolder(boolean constraintMatchEnabled)`

Method Summary
`Collection<ConstraintMatchTotal>` | `getConstraintMatchTotals()` Explains the `Score` of `ScoreHolder.extractScore()`.
`boolean` | `isConstraintMatchEnabled()` Must be in sync with `ScoreDirector.isConstraintMatchEnabled()` for the `ScoreDirector` which contains this `ScoreHolder`.
`protected void` | `registerBigDecimalConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, int scoreLevel, BigDecimal weight, Runnable undoListener)`
`protected void` | `registerDoubleConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, int scoreLevel, double weight, Runnable undoListener)`
`protected void` | `registerIntConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, int scoreLevel, int weight, Runnable undoListener)`
`protected void` | `registerLongConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, int scoreLevel, long weight, Runnable undoListener)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.optaplanner.core.api.score.holder.ScoreHolder
`extractScore`

Field Detail

### constraintMatchEnabled

    protected final boolean constraintMatchEnabled

### constraintMatchTotalMap

    protected final Map<List<Object>,ConstraintMatchTotal> constraintMatchTotalMap

Constructor Detail

### AbstractScoreHolder

    protected AbstractScoreHolder(boolean constraintMatchEnabled)

Method Detail

### isConstraintMatchEnabled

    public boolean isConstraintMatchEnabled()

  Description copied from interface: `ScoreHolder`
  Must be in sync with `ScoreDirector.isConstraintMatchEnabled()` for the `ScoreDirector` which contains this `ScoreHolder`.

  Defaults to true.

  Specified by:
    `isConstraintMatchEnabled` in interface `ScoreHolder`
  Returns:
    false if the `ConstraintMatch`s and `ConstraintMatchTotal`s do not need to be collected which is a performance boost
  See Also:
    `ScoreHolder.getConstraintMatchTotals()`

### getConstraintMatchTotals

    public Collection<ConstraintMatchTotal> getConstraintMatchTotals()

  Description copied from interface: `ScoreHolder`
  Explains the `Score` of `ScoreHolder.extractScore()`.

  Specified by:
    `getConstraintMatchTotals` in interface `ScoreHolder`
  Returns:
    never null

### registerIntConstraintMatch

    protected void registerIntConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
                                              int scoreLevel,
                                              int weight,
                                              Runnable undoListener)

### registerLongConstraintMatch

    protected void registerLongConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
                                               int scoreLevel,
                                               long weight,
                                               Runnable undoListener)

### registerDoubleConstraintMatch

    protected void registerDoubleConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
                                                 int scoreLevel,
                                                 double weight,
                                                 Runnable undoListener)

### registerBigDecimalConstraintMatch

    protected void registerBigDecimalConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
                                                     int scoreLevel,
                                                     BigDecimal weight,
                                                     Runnable undoListener)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.0.0.CR4
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.