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

## Class EntitySelectorFactory<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.AbstractFromConfigFactory<Solution_,​SelectorConfig_>
  - - org.optaplanner.core.impl.heuristic.selector.AbstractSelectorFactory<Solution_,​EntitySelectorConfig>
    - - org.optaplanner.core.impl.heuristic.selector.entity.EntitySelectorFactory<Solution_>

-     public class EntitySelectorFactory<Solution_>
      extends AbstractSelectorFactory<Solution_,​EntitySelectorConfig>

- - ### Field Summary

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

      `config`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EntitySelectorFactory​(EntitySelectorConfig entitySelectorConfig)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected EntitySelector<Solution_>` | `applyProbability​(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, EntitySelector<Solution_> entitySelector)` |
    `protected EntitySelector<Solution_>` | `applySorting​(SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder, EntitySelector<Solution_> entitySelector)` |
    `EntitySelector<Solution_>` | `buildEntitySelector​(HeuristicConfigPolicy<Solution_> configPolicy, SelectionCacheType minimumCacheType, SelectionOrder inheritedSelectionOrder)` |
    `protected EntitySelector<Solution_>` | `buildMimicReplaying​(HeuristicConfigPolicy<Solution_> configPolicy)` |
    `static <Solution_> EntitySelectorFactory<Solution_>` | `create​(EntitySelectorConfig entitySelectorConfig)` |
    `protected boolean` | `determineBaseRandomSelection​(EntityDescriptor<Solution_> entityDescriptor, SelectionCacheType resolvedCacheType, SelectionOrder resolvedSelectionOrder)` |
    `EntityDescriptor<Solution_>` | `extractEntityDescriptor​(HeuristicConfigPolicy<Solution_> configPolicy)` |
    `protected boolean` | `isBaseInherentlyCached()` |
    `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

    - #### EntitySelectorFactory

          public EntitySelectorFactory​(EntitySelectorConfig entitySelectorConfig)

  - ### Method Detail

    - #### create

          public static <Solution_> EntitySelectorFactory<Solution_> create​(EntitySelectorConfig entitySelectorConfig)

    - #### extractEntityDescriptor

          public EntityDescriptor<Solution_> extractEntityDescriptor​(HeuristicConfigPolicy<Solution_> configPolicy)

    - #### buildEntitySelector

          public EntitySelector<Solution_> buildEntitySelector​(HeuristicConfigPolicy<Solution_> configPolicy,
                                                               SelectionCacheType minimumCacheType,
                                                               SelectionOrder inheritedSelectionOrder)

      Parameters:
        `configPolicy` - 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 EntitySelector<Solution_> buildMimicReplaying​(HeuristicConfigPolicy<Solution_> configPolicy)

    - #### determineBaseRandomSelection

          protected boolean determineBaseRandomSelection​(EntityDescriptor<Solution_> entityDescriptor,
                                                         SelectionCacheType resolvedCacheType,
                                                         SelectionOrder resolvedSelectionOrder)

    - #### isBaseInherentlyCached

          protected boolean isBaseInherentlyCached()

    - #### validateSorting

          protected void validateSorting​(SelectionOrder resolvedSelectionOrder)

    - #### applySorting

          protected EntitySelector<Solution_> applySorting​(SelectionCacheType resolvedCacheType,
                                                           SelectionOrder resolvedSelectionOrder,
                                                           EntitySelector<Solution_> entitySelector)

    - #### validateProbability

          protected void validateProbability​(SelectionOrder resolvedSelectionOrder)

    - #### applyProbability

          protected EntitySelector<Solution_> applyProbability​(SelectionCacheType resolvedCacheType,
                                                               SelectionOrder resolvedSelectionOrder,
                                                               EntitySelector<Solution_> entitySelector)