Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.Beta2
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:
  BendableBigDecimalScoreHolder, BendableScoreHolder, HardMediumSoftLongScoreHolder, 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

Nested Class Summary
`protected class` | `AbstractScoreHolder.BigDecimalConstraintUndoListener`
`protected class` | `AbstractScoreHolder.DoubleConstraintUndoListener`
`protected class` | `AbstractScoreHolder.IntConstraintUndoListener`
`protected class` | `AbstractScoreHolder.LongConstraintUndoListener`

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, AbstractScoreHolder.BigDecimalConstraintUndoListener constraintUndoListener)`
`protected void` | `registerDoubleConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, int scoreLevel, double weight, AbstractScoreHolder.DoubleConstraintUndoListener constraintUndoListener)`
`protected void` | `registerIntConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, int scoreLevel, int weight, AbstractScoreHolder.IntConstraintUndoListener constraintUndoListener)`
`protected void` | `registerLongConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, int scoreLevel, long weight, AbstractScoreHolder.LongConstraintUndoListener constraintUndoListener)`

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,
                                              AbstractScoreHolder.IntConstraintUndoListener constraintUndoListener)

### registerLongConstraintMatch

    protected void registerLongConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
                                               int scoreLevel,
                                               long weight,
                                               AbstractScoreHolder.LongConstraintUndoListener constraintUndoListener)

### registerDoubleConstraintMatch

    protected void registerDoubleConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
                                                 int scoreLevel,
                                                 double weight,
                                                 AbstractScoreHolder.DoubleConstraintUndoListener constraintUndoListener)

### registerBigDecimalConstraintMatch

    protected void registerBigDecimalConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
                                                     int scoreLevel,
                                                     BigDecimal weight,
                                                     AbstractScoreHolder.BigDecimalConstraintUndoListener constraintUndoListener)

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

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