org.optaplanner.core.config.solver.termination

## Class TerminationConfig

- java.lang.Object
- - org.optaplanner.core.config.AbstractConfig<TerminationConfig>
  - - org.optaplanner.core.config.solver.termination.TerminationConfig

-     public class TerminationConfig
      extends AbstractConfig<TerminationConfig>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TerminationConfig()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `Termination` | `buildTermination(HeuristicConfigPolicy configPolicy)`
    `Termination` | `buildTermination(HeuristicConfigPolicy configPolicy, Termination chainedTermination)`
    `Long` | `calculateTimeMillisSpentLimit()`
    `Long` | `calculateUnimprovedTimeMillisSpentLimit()`
    `Boolean` | `getBestScoreFeasible()`
    `String` | `getBestScoreLimit()`
    `Long` | `getCalculateCountLimit()` Deprecated. Use `getScoreCalculationCountLimit()` instead. Will be removed in 8.0.
    `Long` | `getDaysSpentLimit()`
    `Long` | `getHoursSpentLimit()`
    `Long` | `getMillisecondsSpentLimit()`
    `Long` | `getMinutesSpentLimit()`
    `Long` | `getScoreCalculationCountLimit()`
    `Long` | `getSecondsSpentLimit()`
    `Duration` | `getSpentLimit()`
    `Integer` | `getStepCountLimit()`
    `Class<? extends Termination>` | `getTerminationClass()`
    `TerminationCompositionStyle` | `getTerminationCompositionStyle()`
    `List<TerminationConfig>` | `getTerminationConfigList()`
    `Long` | `getUnimprovedDaysSpentLimit()`
    `Long` | `getUnimprovedHoursSpentLimit()`
    `Long` | `getUnimprovedMillisecondsSpentLimit()`
    `Long` | `getUnimprovedMinutesSpentLimit()`
    `String` | `getUnimprovedScoreDifferenceThreshold()`
    `Long` | `getUnimprovedSecondsSpentLimit()`
    `Duration` | `getUnimprovedSpentLimit()`
    `Integer` | `getUnimprovedStepCountLimit()`
    `void` | `inherit(TerminationConfig inheritedConfig)` Inherits each property of the `inheritedConfig` unless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).
    `void` | `setBestScoreFeasible(Boolean bestScoreFeasible)`
    `void` | `setBestScoreLimit(String bestScoreLimit)`
    `void` | `setCalculateCountLimit(Long calculateCountLimit)` Deprecated. Use `setScoreCalculationCountLimit(Long)` instead. Will be removed in 8.0.
    `void` | `setDaysSpentLimit(Long daysSpentLimit)`
    `void` | `setHoursSpentLimit(Long hoursSpentLimit)`
    `void` | `setMillisecondsSpentLimit(Long millisecondsSpentLimit)`
    `void` | `setMinutesSpentLimit(Long minutesSpentLimit)`
    `void` | `setScoreCalculationCountLimit(Long scoreCalculationCountLimit)`
    `void` | `setSecondsSpentLimit(Long secondsSpentLimit)`
    `void` | `setSpentLimit(Duration spentLimit)`
    `void` | `setStepCountLimit(Integer stepCountLimit)`
    `void` | `setTerminationClass(Class<? extends Termination> terminationClass)`
    `void` | `setTerminationCompositionStyle(TerminationCompositionStyle terminationCompositionStyle)`
    `void` | `setTerminationConfigList(List<TerminationConfig> terminationConfigList)`
    `void` | `setUnimprovedDaysSpentLimit(Long unimprovedDaysSpentLimit)`
    `void` | `setUnimprovedHoursSpentLimit(Long unimprovedHoursSpentLimit)`
    `void` | `setUnimprovedMillisecondsSpentLimit(Long unimprovedMillisecondsSpentLimit)`
    `void` | `setUnimprovedMinutesSpentLimit(Long unimprovedMinutesSpentLimit)`
    `void` | `setUnimprovedScoreDifferenceThreshold(String unimprovedScoreDifferenceThreshold)`
    `void` | `setUnimprovedSecondsSpentLimit(Long unimprovedSecondsSpentLimit)`
    `void` | `setUnimprovedSpentLimit(Duration unimprovedSpentLimit)`
    `void` | `setUnimprovedStepCountLimit(Integer unimprovedStepCountLimit)`
    `void` | `shortenTimeMillisSpentLimit(long timeMillisSpentLimit)`
    `TerminationConfig` | `withBestScoreFeasible(Boolean bestScoreFeasible)`
    `TerminationConfig` | `withBestScoreLimit(String bestScoreLimit)`
    `TerminationConfig` | `withDaysSpentLimit(Long daysSpentLimit)`
    `TerminationConfig` | `withHoursSpentLimit(Long hoursSpentLimit)`
    `TerminationConfig` | `withMillisecondsSpentLimit(Long millisecondsSpentLimit)`
    `TerminationConfig` | `withMinutesSpentLimit(Long minutesSpentLimit)`
    `TerminationConfig` | `withScoreCalculationCountLimit(Long scoreCalculationCountLimit)`
    `TerminationConfig` | `withSecondsSpentLimit(Long secondsSpentLimit)`
    `TerminationConfig` | `withSpentLimit(Duration spentLimit)`
    `TerminationConfig` | `withStepCountLimit(Integer stepCountLimit)`
    `TerminationConfig` | `withTerminationClass(Class<? extends Termination> terminationClass)`
    `TerminationConfig` | `withTerminationCompositionStyle(TerminationCompositionStyle terminationCompositionStyle)`
    `TerminationConfig` | `withTerminationConfigList(List<TerminationConfig> terminationConfigList)`
    `TerminationConfig` | `withUnimprovedDaysSpentLimit(Long unimprovedDaysSpentLimit)`
    `TerminationConfig` | `withUnimprovedHoursSpentLimit(Long unimprovedHoursSpentLimit)`
    `TerminationConfig` | `withUnimprovedMillisecondsSpentLimit(Long unimprovedMillisecondsSpentLimit)`
    `TerminationConfig` | `withUnimprovedMinutesSpentLimit(Long unimprovedMinutesSpentLimit)`
    `TerminationConfig` | `withUnimprovedScoreDifferenceThreshold(String unimprovedScoreDifferenceThreshold)`
    `TerminationConfig` | `withUnimprovedSecondsSpentLimit(Long unimprovedSecondsSpentLimit)`
    `TerminationConfig` | `withUnimprovedSpentLimit(Duration unimprovedSpentLimit)`
    `TerminationConfig` | `withUnimprovedStepCountLimit(Integer unimprovedStepCountLimit)`

    - ### Methods inherited from class org.optaplanner.core.config.AbstractConfig

      `copyConfig, deduceEntityDescriptor, deduceVariableDescriptor, deduceVariableDescriptorList, newInstance, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TerminationConfig

          public TerminationConfig()

  - ### Method Detail

    - #### getTerminationClass

          public Class<? extends Termination> getTerminationClass()

    - #### setTerminationClass

          public void setTerminationClass(Class<? extends Termination> terminationClass)

    - #### getTerminationCompositionStyle

          public TerminationCompositionStyle getTerminationCompositionStyle()

    - #### setTerminationCompositionStyle

          public void setTerminationCompositionStyle(TerminationCompositionStyle terminationCompositionStyle)

    - #### getSpentLimit

          public Duration getSpentLimit()

    - #### setSpentLimit

          public void setSpentLimit(Duration spentLimit)

    - #### getMillisecondsSpentLimit

          public Long getMillisecondsSpentLimit()

    - #### setMillisecondsSpentLimit

          public void setMillisecondsSpentLimit(Long millisecondsSpentLimit)

    - #### getSecondsSpentLimit

          public Long getSecondsSpentLimit()

    - #### setSecondsSpentLimit

          public void setSecondsSpentLimit(Long secondsSpentLimit)

    - #### getMinutesSpentLimit

          public Long getMinutesSpentLimit()

    - #### setMinutesSpentLimit

          public void setMinutesSpentLimit(Long minutesSpentLimit)

    - #### getHoursSpentLimit

          public Long getHoursSpentLimit()

    - #### setHoursSpentLimit

          public void setHoursSpentLimit(Long hoursSpentLimit)

    - #### getDaysSpentLimit

          public Long getDaysSpentLimit()

    - #### setDaysSpentLimit

          public void setDaysSpentLimit(Long daysSpentLimit)

    - #### getUnimprovedSpentLimit

          public Duration getUnimprovedSpentLimit()

    - #### setUnimprovedSpentLimit

          public void setUnimprovedSpentLimit(Duration unimprovedSpentLimit)

    - #### getUnimprovedMillisecondsSpentLimit

          public Long getUnimprovedMillisecondsSpentLimit()

    - #### setUnimprovedMillisecondsSpentLimit

          public void setUnimprovedMillisecondsSpentLimit(Long unimprovedMillisecondsSpentLimit)

    - #### getUnimprovedSecondsSpentLimit

          public Long getUnimprovedSecondsSpentLimit()

    - #### setUnimprovedSecondsSpentLimit

          public void setUnimprovedSecondsSpentLimit(Long unimprovedSecondsSpentLimit)

    - #### getUnimprovedMinutesSpentLimit

          public Long getUnimprovedMinutesSpentLimit()

    - #### setUnimprovedMinutesSpentLimit

          public void setUnimprovedMinutesSpentLimit(Long unimprovedMinutesSpentLimit)

    - #### getUnimprovedHoursSpentLimit

          public Long getUnimprovedHoursSpentLimit()

    - #### setUnimprovedHoursSpentLimit

          public void setUnimprovedHoursSpentLimit(Long unimprovedHoursSpentLimit)

    - #### getUnimprovedDaysSpentLimit

          public Long getUnimprovedDaysSpentLimit()

    - #### setUnimprovedDaysSpentLimit

          public void setUnimprovedDaysSpentLimit(Long unimprovedDaysSpentLimit)

    - #### getUnimprovedScoreDifferenceThreshold

          public String getUnimprovedScoreDifferenceThreshold()

    - #### setUnimprovedScoreDifferenceThreshold

          public void setUnimprovedScoreDifferenceThreshold(String unimprovedScoreDifferenceThreshold)

    - #### getBestScoreLimit

          public String getBestScoreLimit()

    - #### setBestScoreLimit

          public void setBestScoreLimit(String bestScoreLimit)

    - #### getBestScoreFeasible

          public Boolean getBestScoreFeasible()

    - #### setBestScoreFeasible

          public void setBestScoreFeasible(Boolean bestScoreFeasible)

    - #### getStepCountLimit

          public Integer getStepCountLimit()

    - #### setStepCountLimit

          public void setStepCountLimit(Integer stepCountLimit)

    - #### getUnimprovedStepCountLimit

          public Integer getUnimprovedStepCountLimit()

    - #### setUnimprovedStepCountLimit

          public void setUnimprovedStepCountLimit(Integer unimprovedStepCountLimit)

    - #### getCalculateCountLimit

          @Deprecated
          public Long getCalculateCountLimit()

      Deprecated. Use `getScoreCalculationCountLimit()` instead. Will be removed in 8.0.

    - #### setCalculateCountLimit

          @Deprecated
          public void setCalculateCountLimit(Long calculateCountLimit)

      Deprecated. Use `setScoreCalculationCountLimit(Long)` instead. Will be removed in 8.0.

    - #### getScoreCalculationCountLimit

          public Long getScoreCalculationCountLimit()

    - #### setScoreCalculationCountLimit

          public void setScoreCalculationCountLimit(Long scoreCalculationCountLimit)

    - #### getTerminationConfigList

          public List<TerminationConfig> getTerminationConfigList()

    - #### setTerminationConfigList

          public void setTerminationConfigList(List<TerminationConfig> terminationConfigList)

    - #### withTerminationClass

          public TerminationConfig withTerminationClass(Class<? extends Termination> terminationClass)

    - #### withTerminationCompositionStyle

          public TerminationConfig withTerminationCompositionStyle(TerminationCompositionStyle terminationCompositionStyle)

    - #### withSpentLimit

          public TerminationConfig withSpentLimit(Duration spentLimit)

    - #### withMillisecondsSpentLimit

          public TerminationConfig withMillisecondsSpentLimit(Long millisecondsSpentLimit)

    - #### withSecondsSpentLimit

          public TerminationConfig withSecondsSpentLimit(Long secondsSpentLimit)

    - #### withMinutesSpentLimit

          public TerminationConfig withMinutesSpentLimit(Long minutesSpentLimit)

    - #### withHoursSpentLimit

          public TerminationConfig withHoursSpentLimit(Long hoursSpentLimit)

    - #### withDaysSpentLimit

          public TerminationConfig withDaysSpentLimit(Long daysSpentLimit)

    - #### withUnimprovedSpentLimit

          public TerminationConfig withUnimprovedSpentLimit(Duration unimprovedSpentLimit)

    - #### withUnimprovedMillisecondsSpentLimit

          public TerminationConfig withUnimprovedMillisecondsSpentLimit(Long unimprovedMillisecondsSpentLimit)

    - #### withUnimprovedSecondsSpentLimit

          public TerminationConfig withUnimprovedSecondsSpentLimit(Long unimprovedSecondsSpentLimit)

    - #### withUnimprovedMinutesSpentLimit

          public TerminationConfig withUnimprovedMinutesSpentLimit(Long unimprovedMinutesSpentLimit)

    - #### withUnimprovedHoursSpentLimit

          public TerminationConfig withUnimprovedHoursSpentLimit(Long unimprovedHoursSpentLimit)

    - #### withUnimprovedDaysSpentLimit

          public TerminationConfig withUnimprovedDaysSpentLimit(Long unimprovedDaysSpentLimit)

    - #### withUnimprovedScoreDifferenceThreshold

          public TerminationConfig withUnimprovedScoreDifferenceThreshold(String unimprovedScoreDifferenceThreshold)

    - #### withBestScoreLimit

          public TerminationConfig withBestScoreLimit(String bestScoreLimit)

    - #### withBestScoreFeasible

          public TerminationConfig withBestScoreFeasible(Boolean bestScoreFeasible)

    - #### withStepCountLimit

          public TerminationConfig withStepCountLimit(Integer stepCountLimit)

    - #### withUnimprovedStepCountLimit

          public TerminationConfig withUnimprovedStepCountLimit(Integer unimprovedStepCountLimit)

    - #### withScoreCalculationCountLimit

          public TerminationConfig withScoreCalculationCountLimit(Long scoreCalculationCountLimit)

    - #### withTerminationConfigList

          public TerminationConfig withTerminationConfigList(List<TerminationConfig> terminationConfigList)

    - #### buildTermination

          public Termination buildTermination(HeuristicConfigPolicy configPolicy,
                                              Termination chainedTermination)

    - #### buildTermination

          public Termination buildTermination(HeuristicConfigPolicy configPolicy)

      Parameters:
        `configPolicy` - never null
      Returns:
        sometimes null

    - #### calculateTimeMillisSpentLimit

          public Long calculateTimeMillisSpentLimit()

    - #### shortenTimeMillisSpentLimit

          public void shortenTimeMillisSpentLimit(long timeMillisSpentLimit)

    - #### calculateUnimprovedTimeMillisSpentLimit

          public Long calculateUnimprovedTimeMillisSpentLimit()

    - #### inherit

          public void inherit(TerminationConfig inheritedConfig)

      Description copied from class: `AbstractConfig`
      Inherits each property of the `inheritedConfig` unless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).

      After the inheritance, if a property on this `AbstractConfig` composition is replaced, it should not affect the inherited composition instance.

      Specified by:
        `inherit` in class `AbstractConfig<TerminationConfig>`
      Parameters:
        `inheritedConfig` - never null

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