Package org.optaplanner.core.impl.heuristic.selector.value

## Class ValueSelectorFactory<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.AbstractFromConfigFactory<Solution_,​SelectorConfig_>
  - - org.optaplanner.core.impl.heuristic.selector.AbstractSelectorFactory<Solution_,​ValueSelectorConfig>
    - - org.optaplanner.core.impl.heuristic.selector.value.ValueSelectorFactory<Solution_>

-     public class ValueSelectorFactory<Solution_>
      extends AbstractSelectorFactory<Solution_,​ValueSelectorConfig>

- - ### Field Summary

    - ### Fields inherited from class org.optaplanner.core.impl.AbstractFromConfigFactory

      `config`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ValueSelectorFactory​(ValueSelectorConfig valueSelectorConfig)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected ValueSelector<Solution_>` | `applyFiltering​(ValueSelector<Solution_> valueSelector)` |
    `protected ValueSelector<Solution_>` | `applyInitializedChainedValueFilter​(HeuristicConfigPolicy<Solution_> configPolicy, GenuineVariableDescriptor<Solution_> variableDescriptor, ValueSelector<Solution_> valueSelector)` |
    `protected ValueSelector<Solution_>` | `applyProbability​(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, ValueSelector<Solution_> valueSelector)` |
    `protected ValueSelector<Solution_>` | `applySorting​(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, ValueSelector<Solution_> valueSelector)` |
    `protected ValueSelector<Solution_>` | `buildMimicReplaying​(HeuristicConfigPolicy<Solution_> configPolicy)` |
    `ValueSelector<Solution_>` | `buildValueSelector​(HeuristicConfigPolicy<Solution_> configPolicy, EntityDescriptor<Solution_> entityDescriptor, SelectionCacheType minimumCacheType, SelectionOrder inheritedSelectionOrder)` |
    `ValueSelector<Solution_>` | `buildValueSelector​(HeuristicConfigPolicy<Solution_> configPolicy, EntityDescriptor<Solution_> entityDescriptor, SelectionCacheType minimumCacheType, SelectionOrder inheritedSelectionOrder, boolean applyReinitializeVariableFiltering)` |
    `static <Solution_> ValueSelectorFactory<Solution_>` | `create​(ValueSelectorConfig valueSelectorConfig)` |
    `protected boolean` | `determineBaseRandomSelection​(GenuineVariableDescriptor<Solution_> variableDescriptor, SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder)` |
    `protected EntityDescriptor<Solution_>` | `downcastEntityDescriptor​(HeuristicConfigPolicy<Solution_> configPolicy, EntityDescriptor<Solution_> entityDescriptor)` |
    `GenuineVariableDescriptor<Solution_>` | `extractVariableDescriptor​(HeuristicConfigPolicy<Solution_> configPolicy, EntityDescriptor<Solution_> entityDescriptor)` |
    `protected boolean` | `isBaseInherentlyCached​(GenuineVariableDescriptor<Solution_> variableDescriptor)` |
    `protected void` | `validateProbability​(SelectionOrder resolvedSelectionOrder)` |
    `protected void` | `validateSorting​(SelectionOrder resolvedSelectionOrder)` |

    - ### Methods inherited from class org.optaplanner.core.impl.heuristic.selector.AbstractSelectorFactory

      `validateCacheTypeVersusSelectionOrder`

    - ### Methods inherited from class org.optaplanner.core.impl.AbstractFromConfigFactory

      `deduceEntityDescriptor, deduceEntityDescriptor, deduceVariableDescriptor, deduceVariableDescriptor, deduceVariableDescriptorList`

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

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

- - ### Constructor Detail

    - #### ValueSelectorFactory

          public ValueSelectorFactory​(ValueSelectorConfig valueSelectorConfig)

  - ### Method Detail

    - #### create

          public static <Solution_> ValueSelectorFactory<Solution_> create​(ValueSelectorConfig valueSelectorConfig)

    - #### extractVariableDescriptor

          public GenuineVariableDescriptor<Solution_> extractVariableDescriptor​(HeuristicConfigPolicy<Solution_> configPolicy,
                                                                                EntityDescriptor<Solution_> entityDescriptor)

    - #### buildValueSelector

          public ValueSelector<Solution_> buildValueSelector​(HeuristicConfigPolicy<Solution_> configPolicy,
                                                             EntityDescriptor<Solution_> 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

    - #### buildValueSelector

          public ValueSelector<Solution_> buildValueSelector​(HeuristicConfigPolicy<Solution_> configPolicy,
                                                             EntityDescriptor<Solution_> entityDescriptor,
                                                             SelectionCacheType minimumCacheType,
                                                             SelectionOrder inheritedSelectionOrder,
                                                             boolean applyReinitializeVariableFiltering)

    - #### buildMimicReplaying

          protected ValueSelector<Solution_> buildMimicReplaying​(HeuristicConfigPolicy<Solution_> configPolicy)

    - #### downcastEntityDescriptor

          protected EntityDescriptor<Solution_> downcastEntityDescriptor​(HeuristicConfigPolicy<Solution_> configPolicy,
                                                                         EntityDescriptor<Solution_> entityDescriptor)

    - #### determineBaseRandomSelection

          protected boolean determineBaseRandomSelection​(GenuineVariableDescriptor<Solution_> variableDescriptor,
                                                         SelectionCacheType resolvedCacheType,
                                                         SelectionOrder resolvedSelectionOrder)

    - #### isBaseInherentlyCached

          protected boolean isBaseInherentlyCached​(GenuineVariableDescriptor<Solution_> variableDescriptor)

    - #### applyFiltering

          protected ValueSelector<Solution_> applyFiltering​(ValueSelector<Solution_> valueSelector)

    - #### applyInitializedChainedValueFilter

          protected ValueSelector<Solution_> applyInitializedChainedValueFilter​(HeuristicConfigPolicy<Solution_> configPolicy,
                                                                                GenuineVariableDescriptor<Solution_> variableDescriptor,
                                                                                ValueSelector<Solution_> valueSelector)

    - #### validateSorting

          protected void validateSorting​(SelectionOrder resolvedSelectionOrder)

    - #### applySorting

          protected ValueSelector<Solution_> applySorting​(SelectionCacheType resolvedCacheType,
                                                          SelectionOrder resolvedSelectionOrder,
                                                          ValueSelector<Solution_> valueSelector)

    - #### validateProbability

          protected void validateProbability​(SelectionOrder resolvedSelectionOrder)

    - #### applyProbability

          protected ValueSelector<Solution_> applyProbability​(SelectionCacheType resolvedCacheType,
                                                              SelectionOrder resolvedSelectionOrder,
                                                              ValueSelector<Solution_> valueSelector)