org.optaplanner.core.config

## Class AbstractConfig<C extends AbstractConfig>

- java.lang.Object
- - org.optaplanner.core.config.AbstractConfig<C>

- Type Parameters:
    `C` - the same class as the implementing subclass
  Direct Known Subclasses:
    AcceptorConfig, BenchmarkReportConfig, BestSolutionRecallerConfig, ConstructionHeuristicForagerConfig, EntityPlacerConfig, LocalSearchForagerConfig, PhaseConfig, ProblemBenchmarksConfig, ScanAnnotatedClassesConfig, ScoreDirectorFactoryConfig, SelectorConfig, SolverBenchmarkConfig, SolverConfig, TerminationConfig

      public abstract class AbstractConfig<C extends AbstractConfig>
      extends Object

  A config class is a user friendly, validating configuration class that maps XML input. It builds the runtime impl classes (which are optimized for scalability and performance instead).

  A config class should adhere to "configuration by exception" in its XML/JSON input/output, so all non-static fields should be null by default. Using the config class to build a runtime class, must not alter the config class's XML/JSON output.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractConfig()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `C` | `copyConfig()`
    `protected EntityDescriptor` | `deduceEntityDescriptor(SolutionDescriptor solutionDescriptor, Class<?> entityClass)`
    `protected GenuineVariableDescriptor` | `deduceVariableDescriptor(EntityDescriptor entityDescriptor, String variableName)`
    `protected List<GenuineVariableDescriptor>` | `deduceVariableDescriptorList(EntityDescriptor entityDescriptor, List<String> variableNameIncludeList)`
    `abstract void` | `inherit(C inheritedConfig)` Inherits each property of the `inheritedConfig` unless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).
    `C` | `newInstance()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### AbstractConfig

          public AbstractConfig()

  - ### Method Detail

    - #### newInstance

          public C newInstance()

      Returns:
        never null

    - #### copyConfig

          public C copyConfig()

    - #### deduceEntityDescriptor

          protected EntityDescriptor deduceEntityDescriptor(SolutionDescriptor solutionDescriptor,
                                                            Class<?> entityClass)

    - #### deduceVariableDescriptor

          protected GenuineVariableDescriptor deduceVariableDescriptor(EntityDescriptor entityDescriptor,
                                                                       String variableName)

    - #### deduceVariableDescriptorList

          protected List<GenuineVariableDescriptor> deduceVariableDescriptorList(EntityDescriptor entityDescriptor,
                                                                                 List<String> variableNameIncludeList)

    - #### inherit

          public abstract void inherit(C inheritedConfig)

      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.

      Parameters:
        `inheritedConfig` - never null

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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