org.optaplanner.core.config.heuristic.selector.value

## Class ValueSelectorConfig

- java.lang.Object
- - org.optaplanner.core.config.AbstractConfig<C>
  - - org.optaplanner.core.config.heuristic.selector.SelectorConfig<ValueSelectorConfig>
    - - org.optaplanner.core.config.heuristic.selector.value.ValueSelectorConfig

-     public class ValueSelectorConfig
      extends SelectorConfig<ValueSelectorConfig>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected SelectionCacheType` | `cacheType`
    `protected Class<?>` | `downcastEntityClass`
    `protected List<Class<? extends SelectionFilter>>` | `filterClassList`
    `protected String` | `id`
    `protected String` | `mimicSelectorRef`
    `protected NearbySelectionConfig` | `nearbySelectionConfig`
    `protected Class<? extends SelectionProbabilityWeightFactory>` | `probabilityWeightFactoryClass`
    `protected Long` | `selectedCountLimit`
    `protected SelectionOrder` | `selectionOrder`
    `protected Class<? extends SelectionSorter>` | `sorterClass`
    `protected Class<? extends Comparator>` | `sorterComparatorClass`
    `protected ValueSorterManner` | `sorterManner`
    `protected SelectionSorterOrder` | `sorterOrder`
    `protected Class<? extends SelectionSorterWeightFactory>` | `sorterWeightFactoryClass`
    `protected String` | `variableName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValueSelectorConfig()`
    `ValueSelectorConfig(String variableName)`
    `ValueSelectorConfig(ValueSelectorConfig inheritedConfig)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected ValueSelector` | `applyInitializedChainedValueFilter(HeuristicConfigPolicy configPolicy, GenuineVariableDescriptor variableDescriptor, SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, ValueSelector valueSelector)`
    `protected ValueSelector` | `buildMimicReplaying(HeuristicConfigPolicy configPolicy)`
    `ValueSelector` | `buildValueSelector(HeuristicConfigPolicy configPolicy, EntityDescriptor entityDescriptor, SelectionCacheType minimumCacheType, SelectionOrder inheritedSelectionOrder)`
    `protected boolean` | `determineBaseRandomSelection(GenuineVariableDescriptor variableDescriptor, SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder)`
    `static SelectionSorter` | `determineSorter(ValueSorterManner valueSorterManner, GenuineVariableDescriptor variableDescriptor)`
    `protected EntityDescriptor` | `downcastEntityDescriptor(HeuristicConfigPolicy configPolicy, EntityDescriptor entityDescriptor)`
    `GenuineVariableDescriptor` | `extractVariableDescriptor(HeuristicConfigPolicy configPolicy, EntityDescriptor entityDescriptor)`
    `SelectionCacheType` | `getCacheType()`
    `Class<?>` | `getDowncastEntityClass()`
    `List<Class<? extends SelectionFilter>>` | `getFilterClassList()`
    `String` | `getId()`
    `String` | `getMimicSelectorRef()`
    `NearbySelectionConfig` | `getNearbySelectionConfig()`
    `Class<? extends SelectionProbabilityWeightFactory>` | `getProbabilityWeightFactoryClass()`
    `Long` | `getSelectedCountLimit()`
    `SelectionOrder` | `getSelectionOrder()`
    `Class<? extends SelectionSorter>` | `getSorterClass()`
    `Class<? extends Comparator>` | `getSorterComparatorClass()`
    `ValueSorterManner` | `getSorterManner()`
    `SelectionSorterOrder` | `getSorterOrder()`
    `Class<? extends SelectionSorterWeightFactory>` | `getSorterWeightFactoryClass()`
    `String` | `getVariableName()`
    `static boolean` | `hasSorter(ValueSorterManner valueSorterManner, GenuineVariableDescriptor variableDescriptor)`
    `void` | `inherit(ValueSelectorConfig inheritedConfig)` Inherits each property of the `inheritedConfig` unless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).
    `protected boolean` | `isBaseInherentlyCached(GenuineVariableDescriptor variableDescriptor)`
    `void` | `setCacheType(SelectionCacheType cacheType)`
    `void` | `setDowncastEntityClass(Class<?> downcastEntityClass)`
    `void` | `setFilterClassList(List<Class<? extends SelectionFilter>> filterClassList)`
    `void` | `setId(String id)`
    `void` | `setMimicSelectorRef(String mimicSelectorRef)`
    `void` | `setNearbySelectionConfig(NearbySelectionConfig nearbySelectionConfig)`
    `void` | `setProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass)`
    `void` | `setSelectedCountLimit(Long selectedCountLimit)`
    `void` | `setSelectionOrder(SelectionOrder selectionOrder)`
    `void` | `setSorterClass(Class<? extends SelectionSorter> sorterClass)`
    `void` | `setSorterComparatorClass(Class<? extends Comparator> sorterComparatorClass)`
    `void` | `setSorterManner(ValueSorterManner sorterManner)`
    `void` | `setSorterOrder(SelectionSorterOrder sorterOrder)`
    `void` | `setSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass)`
    `void` | `setVariableName(String variableName)`
    `String` | `toString()`

    - ### Methods inherited from class org.optaplanner.core.config.heuristic.selector.SelectorConfig

      `validateCacheTypeVersusSelectionOrder`

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

      `copyConfig, deduceEntityDescriptor, deduceVariableDescriptor, deduceVariableDescriptorList, newInstance`

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

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

- - ### Field Detail

    - #### id

          @XStreamAsAttribute
          protected String id

    - #### mimicSelectorRef

          @XStreamAsAttribute
          protected String mimicSelectorRef

    - #### downcastEntityClass

          protected Class<?> downcastEntityClass

    - #### variableName

          @XStreamAsAttribute
          protected String variableName

    - #### cacheType

          protected SelectionCacheType cacheType

    - #### selectionOrder

          protected SelectionOrder selectionOrder

    - #### nearbySelectionConfig

          protected NearbySelectionConfig nearbySelectionConfig

    - #### filterClassList

          protected List<Class<? extends SelectionFilter>> filterClassList

    - #### sorterManner

          protected ValueSorterManner sorterManner

    - #### sorterComparatorClass

          protected Class<? extends Comparator> sorterComparatorClass

    - #### sorterWeightFactoryClass

          protected Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass

    - #### sorterOrder

          protected SelectionSorterOrder sorterOrder

    - #### sorterClass

          protected Class<? extends SelectionSorter> sorterClass

    - #### probabilityWeightFactoryClass

          protected Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass

    - #### selectedCountLimit

          protected Long selectedCountLimit

  - ### Constructor Detail

    - #### ValueSelectorConfig

          public ValueSelectorConfig()

    - #### ValueSelectorConfig

          public ValueSelectorConfig(String variableName)

    - #### ValueSelectorConfig

          public ValueSelectorConfig(ValueSelectorConfig inheritedConfig)

  - ### Method Detail

    - #### getId

          public String getId()

    - #### setId

          public void setId(String id)

    - #### getMimicSelectorRef

          public String getMimicSelectorRef()

    - #### setMimicSelectorRef

          public void setMimicSelectorRef(String mimicSelectorRef)

    - #### getDowncastEntityClass

          public Class<?> getDowncastEntityClass()

    - #### setDowncastEntityClass

          public void setDowncastEntityClass(Class<?> downcastEntityClass)

    - #### getVariableName

          public String getVariableName()

    - #### setVariableName

          public void setVariableName(String variableName)

    - #### getCacheType

          public SelectionCacheType getCacheType()

    - #### setCacheType

          public void setCacheType(SelectionCacheType cacheType)

    - #### getSelectionOrder

          public SelectionOrder getSelectionOrder()

    - #### setSelectionOrder

          public void setSelectionOrder(SelectionOrder selectionOrder)

    - #### getNearbySelectionConfig

          public NearbySelectionConfig getNearbySelectionConfig()

    - #### setNearbySelectionConfig

          public void setNearbySelectionConfig(NearbySelectionConfig nearbySelectionConfig)

    - #### getFilterClassList

          public List<Class<? extends SelectionFilter>> getFilterClassList()

    - #### setFilterClassList

          public void setFilterClassList(List<Class<? extends SelectionFilter>> filterClassList)

    - #### getSorterManner

          public ValueSorterManner getSorterManner()

    - #### setSorterManner

          public void setSorterManner(ValueSorterManner sorterManner)

    - #### getSorterComparatorClass

          public Class<? extends Comparator> getSorterComparatorClass()

    - #### setSorterComparatorClass

          public void setSorterComparatorClass(Class<? extends Comparator> sorterComparatorClass)

    - #### getSorterWeightFactoryClass

          public Class<? extends SelectionSorterWeightFactory> getSorterWeightFactoryClass()

    - #### setSorterWeightFactoryClass

          public void setSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass)

    - #### getSorterOrder

          public SelectionSorterOrder getSorterOrder()

    - #### setSorterOrder

          public void setSorterOrder(SelectionSorterOrder sorterOrder)

    - #### getSorterClass

          public Class<? extends SelectionSorter> getSorterClass()

    - #### setSorterClass

          public void setSorterClass(Class<? extends SelectionSorter> sorterClass)

    - #### getProbabilityWeightFactoryClass

          public Class<? extends SelectionProbabilityWeightFactory> getProbabilityWeightFactoryClass()

    - #### setProbabilityWeightFactoryClass

          public void setProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass)

    - #### getSelectedCountLimit

          public Long getSelectedCountLimit()

    - #### setSelectedCountLimit

          public void setSelectedCountLimit(Long selectedCountLimit)

    - #### extractVariableDescriptor

          public GenuineVariableDescriptor extractVariableDescriptor(HeuristicConfigPolicy configPolicy,
                                                                     EntityDescriptor entityDescriptor)

    - #### buildValueSelector

          public ValueSelector buildValueSelector(HeuristicConfigPolicy configPolicy,
                                                  EntityDescriptor entityDescriptor,
                                                  SelectionCacheType minimumCacheType,
                                                  SelectionOrder inheritedSelectionOrder)

      Parameters:
        `configPolicy` - never null
        `entityDescriptor` - never null
        `minimumCacheType` - never null, If caching is used (different from `SelectionCacheType.JUST_IN_TIME`), then it should be at least this `SelectionCacheType` because an ancestor already uses such caching and less would be pointless.
        `inheritedSelectionOrder` - never null
      Returns:
        never null

    - #### buildMimicReplaying

          protected ValueSelector buildMimicReplaying(HeuristicConfigPolicy configPolicy)

    - #### downcastEntityDescriptor

          protected EntityDescriptor downcastEntityDescriptor(HeuristicConfigPolicy configPolicy,
                                                              EntityDescriptor entityDescriptor)

    - #### determineBaseRandomSelection

          protected boolean determineBaseRandomSelection(GenuineVariableDescriptor variableDescriptor,
                                                         SelectionCacheType resolvedCacheType,
                                                         SelectionOrder resolvedSelectionOrder)

    - #### isBaseInherentlyCached

          protected boolean isBaseInherentlyCached(GenuineVariableDescriptor variableDescriptor)

    - #### applyInitializedChainedValueFilter

          protected ValueSelector applyInitializedChainedValueFilter(HeuristicConfigPolicy configPolicy,
                                                                     GenuineVariableDescriptor variableDescriptor,
                                                                     SelectionCacheType resolvedCacheType,
                                                                     SelectionOrder resolvedSelectionOrder,
                                                                     ValueSelector valueSelector)

    - #### inherit

          public void inherit(ValueSelectorConfig 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.

      Overrides:
        `inherit` in class `SelectorConfig<ValueSelectorConfig>`
      Parameters:
        `inheritedConfig` - never null

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `AbstractConfig<ValueSelectorConfig>`

    - #### hasSorter

          public static boolean hasSorter(ValueSorterManner valueSorterManner,
                                          GenuineVariableDescriptor variableDescriptor)

    - #### determineSorter

          public static SelectionSorter determineSorter(ValueSorterManner valueSorterManner,
                                                        GenuineVariableDescriptor variableDescriptor)

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