Package org.optaplanner.core.impl.score.director

## Class AbstractScoreDirectorFactory<Solution_,​Score_ extends Score<Score_>>

- java.lang.Object
- - org.optaplanner.core.impl.score.director.AbstractScoreDirectorFactory<Solution_,​Score_>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
    `Score_` - the score type to go with the solution
  All Implemented Interfaces:
    `InnerScoreDirectorFactory<Solution_,​Score_>`, `ScoreDirectorFactory<Solution_>`
  Direct Known Subclasses:
    `AbstractConstraintStreamScoreDirectorFactory`, `DroolsScoreDirectorFactory`, `EasyScoreDirectorFactory`, `IncrementalScoreDirectorFactory`

      public abstract class AbstractScoreDirectorFactory<Solution_,​Score_ extends Score<Score_>>
      extends Object
      implements InnerScoreDirectorFactory<Solution_,​Score_>

  Abstract superclass for `ScoreDirectorFactory`.
  See Also:
    `ScoreDirectorFactory`

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected boolean` | `assertClonedSolution` |
    `protected InnerScoreDirectorFactory<Solution_,​Score_>` | `assertionScoreDirectorFactory` |
    `protected InitializingScoreTrend` | `initializingScoreTrend` |
    `protected org.slf4j.Logger` | `logger` |
    `protected SolutionDescriptor<Solution_>` | `solutionDescriptor` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractScoreDirectorFactory​(SolutionDescriptor<Solution_> solutionDescriptor)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `assertScoreFromScratch​(Solution_ solution)` | Asserts that if the `Score` is calculated for the parameter solution, it would be equal to the score of that parameter.
    `InnerScoreDirector<Solution_,​Score_>` | `buildScoreDirector()` | Creates a new `ScoreDirector` instance.
    `InnerScoreDirectorFactory<Solution_,​Score_>` | `getAssertionScoreDirectorFactory()` |
    `InitializingScoreTrend` | `getInitializingScoreTrend()` |
    `ScoreDefinition<Score_>` | `getScoreDefinition()` |
    `SolutionDescriptor<Solution_>` | `getSolutionDescriptor()` |
    `boolean` | `isAssertClonedSolution()` |
    `void` | `setAssertClonedSolution​(boolean assertClonedSolution)` |
    `void` | `setAssertionScoreDirectorFactory​(InnerScoreDirectorFactory<Solution_,​Score_> assertionScoreDirectorFactory)` |
    `void` | `setInitializingScoreTrend​(InitializingScoreTrend initializingScoreTrend)` |

    - ### 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.impl.score.director.InnerScoreDirectorFactory

      `buildScoreDirector`

- - ### Field Detail

    - #### logger

          protected final transient org.slf4j.Logger logger

    - #### solutionDescriptor

          protected SolutionDescriptor<Solution_> solutionDescriptor

    - #### initializingScoreTrend

          protected InitializingScoreTrend initializingScoreTrend

    - #### assertionScoreDirectorFactory

          protected InnerScoreDirectorFactory<Solution_,​Score_ extends Score<Score_>> assertionScoreDirectorFactory

    - #### assertClonedSolution

          protected boolean assertClonedSolution

  - ### Constructor Detail

    - #### AbstractScoreDirectorFactory

          public AbstractScoreDirectorFactory​(SolutionDescriptor<Solution_> solutionDescriptor)

  - ### Method Detail

    - #### getSolutionDescriptor

          public SolutionDescriptor<Solution_> getSolutionDescriptor()

      Specified by:
        `getSolutionDescriptor` in interface `InnerScoreDirectorFactory<Solution_,​Score_ extends Score<Score_>>`
      Returns:
        never null

    - #### getScoreDefinition

          public ScoreDefinition<Score_> getScoreDefinition()

      Specified by:
        `getScoreDefinition` in interface `InnerScoreDirectorFactory<Solution_,​Score_ extends Score<Score_>>`
      Returns:
        never null

    - #### getInitializingScoreTrend

          public InitializingScoreTrend getInitializingScoreTrend()

      Specified by:
        `getInitializingScoreTrend` in interface `InnerScoreDirectorFactory<Solution_,​Score_ extends Score<Score_>>`
      Returns:
        never null

    - #### setInitializingScoreTrend

          public void setInitializingScoreTrend​(InitializingScoreTrend initializingScoreTrend)

    - #### getAssertionScoreDirectorFactory

          public InnerScoreDirectorFactory<Solution_,​Score_> getAssertionScoreDirectorFactory()

    - #### setAssertionScoreDirectorFactory

          public void setAssertionScoreDirectorFactory​(InnerScoreDirectorFactory<Solution_,​Score_> assertionScoreDirectorFactory)

    - #### isAssertClonedSolution

          public boolean isAssertClonedSolution()

    - #### setAssertClonedSolution

          public void setAssertClonedSolution​(boolean assertClonedSolution)

    - #### buildScoreDirector

          public InnerScoreDirector<Solution_,​Score_> buildScoreDirector()

      Description copied from interface: `ScoreDirectorFactory`
      Creates a new `ScoreDirector` instance.
      Specified by:
        `buildScoreDirector` in interface `InnerScoreDirectorFactory<Solution_,​Score_ extends Score<Score_>>`
      Specified by:
        `buildScoreDirector` in interface `ScoreDirectorFactory<Solution_>`
      Returns:
        never null

    - #### assertScoreFromScratch

          public void assertScoreFromScratch​(Solution_ solution)

      Description copied from interface: `InnerScoreDirectorFactory`
      Asserts that if the `Score` is calculated for the parameter solution, it would be equal to the score of that parameter.
      Specified by:
        `assertScoreFromScratch` in interface `InnerScoreDirectorFactory<Solution_,​Score_ extends Score<Score_>>`
      Parameters:
        `solution` - never null
      See Also:
        `InnerScoreDirector.assertWorkingScoreFromScratch(Score, Object)`