org.optaplanner.core.api.score

## Interface ScoreManager<Solution_>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
  All Known Implementing Classes:
    DefaultScoreManager

      public interface ScoreManager<Solution_>

  A stateless service to help calculate `Score`, `ConstraintMatchTotal`, `Indictment`, etc.

  To create a ScoreManager, use `create(SolverFactory)`.

  These methods are thread-safe unless explicitly stated otherwise.

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <Solution_> ScoreManager<Solution_>` | `create(SolverFactory<Solution_> solverFactory)` Uses a `SolverFactory` to build a `ScoreManager`.
    `void` | `updateScore(Solution_ solution)` Calculates the `Score` of a `PlanningSolution` and updates its `PlanningScore` member.

- - ### Method Detail

    - #### create

          static <Solution_> ScoreManager<Solution_> create(SolverFactory<Solution_> solverFactory)

      Uses a `SolverFactory` to build a `ScoreManager`.
      Type Parameters:
        `Solution_` - the solution type, the class with the `PlanningSolution` annotation
      Parameters:
        `solverFactory` - never null
      Returns:
        never null

    - #### updateScore

          void updateScore(Solution_ solution)

      Calculates the `Score` of a `PlanningSolution` and updates its `PlanningScore` member.
      Parameters:
        `solution` - never null

Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.