org.optaplanner.core.impl.score.director

## Class AbstractScoreDirectorFactory<Solution_>

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

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
  All Implemented Interfaces:
    InnerScoreDirectorFactory<Solution_>, ScoreDirectorFactory<Solution_>
  Direct Known Subclasses:
    ConstraintStreamScoreDirectorFactory, DroolsScoreDirectorFactory, EasyScoreDirectorFactory, IncrementalScoreDirectorFactory

      public abstract class AbstractScoreDirectorFactory<Solution_>
      extends Object
      implements InnerScoreDirectorFactory<Solution_>

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

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractScoreDirectorFactory(SolutionDescriptor<Solution_> solutionDescriptor)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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_>` | `buildScoreDirector()` Creates a new `ScoreDirector` instance.
    `InnerScoreDirectorFactory<Solution_>` | `getAssertionScoreDirectorFactory()`
    `InitializingScoreTrend` | `getInitializingScoreTrend()`
    `ScoreDefinition` | `getScoreDefinition()`
    `SolutionDescriptor<Solution_>` | `getSolutionDescriptor()`
    `boolean` | `isAssertClonedSolution()`
    `void` | `setAssertClonedSolution(boolean assertClonedSolution)`
    `void` | `setAssertionScoreDirectorFactory(InnerScoreDirectorFactory<Solution_> 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_> 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_>`
      Returns:
        never null

    - #### getScoreDefinition

          public ScoreDefinition getScoreDefinition()

      Specified by:
        `getScoreDefinition` in interface `InnerScoreDirectorFactory<Solution_>`
      Returns:
        never null

    - #### getInitializingScoreTrend

          public InitializingScoreTrend getInitializingScoreTrend()

      Specified by:
        `getInitializingScoreTrend` in interface `InnerScoreDirectorFactory<Solution_>`
      Returns:
        never null

    - #### setInitializingScoreTrend

          public void setInitializingScoreTrend(InitializingScoreTrend initializingScoreTrend)

    - #### getAssertionScoreDirectorFactory

          public InnerScoreDirectorFactory<Solution_> getAssertionScoreDirectorFactory()

    - #### setAssertionScoreDirectorFactory

          public void setAssertionScoreDirectorFactory(InnerScoreDirectorFactory<Solution_> assertionScoreDirectorFactory)

    - #### isAssertClonedSolution

          public boolean isAssertClonedSolution()

    - #### setAssertClonedSolution

          public void setAssertClonedSolution(boolean assertClonedSolution)

    - #### buildScoreDirector

          public InnerScoreDirector<Solution_> buildScoreDirector()

      Description copied from interface: `ScoreDirectorFactory`
      Creates a new `ScoreDirector` instance.
      Specified by:
        `buildScoreDirector` in interface `InnerScoreDirectorFactory<Solution_>`
      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_>`
      Parameters:
        `solution` - never null
      See Also:
        `InnerScoreDirector.assertWorkingScoreFromScratch(Score, Object)`

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