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

## org.optaplanner.core.api.score.holder
Interface ScoreHolder

All Known Implementing Classes:
  AbstractScoreHolder, BendableScoreHolder, HardMediumSoftScoreHolder, HardSoftBigDecimalScoreHolder, HardSoftDoubleScoreHolder, HardSoftLongScoreHolder, HardSoftScoreHolder, SimpleBigDecimalScoreHolder, SimpleDoubleScoreHolder, SimpleLongScoreHolder, SimpleScoreHolder

    public interface ScoreHolder

This class is injected as a global by `DroolsScoreDirector` into the Drools DRL. Other `ScoreDirector` implementations do not use this class.

See Also:
  `AbstractScoreHolder`

Method Summary
`Score` | `extractScore()` Extracts the `Score`, calculated by the `KieSession` for `DroolsScoreDirector`.
`Collection<ConstraintMatchTotal>` | `getConstraintMatchTotals()` Explains the `Score` of `extractScore()`.
`boolean` | `isConstraintMatchEnabled()` Must be in sync with `ScoreDirector.isConstraintMatchEnabled()` for the `ScoreDirector` which contains this `ScoreHolder`.

Method Detail

### extractScore

    Score extractScore()

  Extracts the `Score`, calculated by the `KieSession` for `DroolsScoreDirector`. Should not be called directly, use `ScoreDirector.calculateScore()` instead.

  Returns:
    never null, the `Score` of the working `Solution`

### isConstraintMatchEnabled

    boolean isConstraintMatchEnabled()

  Must be in sync with `ScoreDirector.isConstraintMatchEnabled()` for the `ScoreDirector` which contains this `ScoreHolder`.

  Defaults to true.

  Returns:
    false if the `ConstraintMatch`s and `ConstraintMatchTotal`s do not need to be collected which is a performance boost
  See Also:
    `getConstraintMatchTotals()`

### getConstraintMatchTotals

    Collection<ConstraintMatchTotal> getConstraintMatchTotals()

  Explains the `Score` of `extractScore()`.

  Returns:
    never null
  Throws:
    `RuntimeException` - if `isConstraintMatchEnabled()` is false

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.0.0.CR5
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.