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

## org.optaplanner.core.impl.score.definition
Interface ScoreDefinition<S extends Score>

All Known Subinterfaces:
  FeasibilityScoreDefinition<S>

All Known Implementing Classes:
  AbstractFeasibilityScoreDefinition, AbstractScoreDefinition, BendableBigDecimalScoreDefinition, BendableScoreDefinition, HardMediumSoftLongScoreDefinition, HardMediumSoftScoreDefinition, HardSoftBigDecimalScoreDefinition, HardSoftDoubleScoreDefinition, HardSoftLongScoreDefinition, HardSoftScoreDefinition, SimpleBigDecimalScoreDefinition, SimpleDoubleScoreDefinition, SimpleLongScoreDefinition, SimpleScoreDefinition

    public interface ScoreDefinition<S extends Score>

A ScoreDefinition knows how to compare `Score`s and what the perfect maximum/minimum `Score` is.

See Also:
  `AbstractScoreDefinition`, `HardSoftScoreDefinition`

Method Summary
`S` | `buildOptimisticBound(InitializingScoreTrend initializingScoreTrend, S score)` Builds a `Score` which is equal or better than any other `Score` with more variables initialized (while the already variables don't change).
`S` | `buildPessimisticBound(InitializingScoreTrend initializingScoreTrend, S score)` Builds a `Score` which is equal or worse than any other `Score` with more variables initialized (while the already variables don't change).
`ScoreHolder` | `buildScoreHolder(boolean constraintMatchEnabled)` Used by `DroolsScoreDirector`.
`String` | `formatScore(S score)` Returns a `String` representation of the `Score`.
`int` | `getLevelsSize()` Returns the length of `Score.toLevelNumbers()` for every `Score` of this definition.
`Class<S>` | `getScoreClass()` Returns the `Class` of the actual `Score` implementation
`S` | `parseScore(String scoreString)` Parses the `String` and returns a `Score`.

Method Detail

### getLevelsSize

    int getLevelsSize()

  Returns the length of `Score.toLevelNumbers()` for every `Score` of this definition.

  Returns:
    at least 1

### getScoreClass

    Class<S> getScoreClass()

  Returns the `Class` of the actual `Score` implementation

  Returns:
    never null

### formatScore

    String formatScore(S score)

  Returns a `String` representation of the `Score`.

  Parameters:
    `score` - never null
  Returns:
    never null
  See Also:
    `parseScore(String)`

### parseScore

    S parseScore(String scoreString)

  Parses the `String` and returns a `Score`.

  Parameters:
    `scoreString` - never null
  Returns:
    never null
  See Also:
    `formatScore(Score)`

### buildScoreHolder

    ScoreHolder buildScoreHolder(boolean constraintMatchEnabled)

  Used by `DroolsScoreDirector`.

  Parameters:
    `constraintMatchEnabled` - true if `ScoreHolder.isConstraintMatchEnabled()` should be true
  Returns:
    never null

### buildOptimisticBound

    S buildOptimisticBound(InitializingScoreTrend initializingScoreTrend,
                           S score)

  Builds a `Score` which is equal or better than any other `Score` with more variables initialized (while the already variables don't change).

  Parameters:
    `initializingScoreTrend` - never null, with `InitializingScoreTrend.getLevelsSize()` equal to `getLevelsSize()`.
    `score` - never null
  Returns:
    never null

### buildPessimisticBound

    S buildPessimisticBound(InitializingScoreTrend initializingScoreTrend,
                            S score)

  Builds a `Score` which is equal or worse than any other `Score` with more variables initialized (while the already variables don't change).

  Parameters:
    `initializingScoreTrend` - never null, with `InitializingScoreTrend.getLevelsSize()` equal to `getLevelsSize()`.
    `score` - never null
  Returns:
    never null

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