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

## Class EntityIndependentInitializedValueSelector<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.heuristic.selector.AbstractSelector<Solution_>
  - - org.optaplanner.core.impl.heuristic.selector.value.AbstractValueSelector<Solution_>
    - - org.optaplanner.core.impl.heuristic.selector.value.decorator.InitializedValueSelector<Solution_>
      - - org.optaplanner.core.impl.heuristic.selector.value.decorator.EntityIndependentInitializedValueSelector<Solution_>

- All Implemented Interfaces:
    `Iterable<Object>`, `EventListener`, `IterableSelector<Solution_,​Object>`, `Selector<Solution_>`, `EntityIndependentValueSelector<Solution_>`, `ValueSelector<Solution_>`, `PhaseLifecycleListener<Solution_>`, `SolverLifecycleListener<Solution_>`

      public class EntityIndependentInitializedValueSelector<Solution_>
      extends InitializedValueSelector<Solution_>
      implements EntityIndependentValueSelector<Solution_>

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.optaplanner.core.impl.heuristic.selector.value.decorator.InitializedValueSelector

      `InitializedValueSelector.JustInTimeInitializedValueIterator`

  - ### Field Summary

    - ### Fields inherited from class org.optaplanner.core.impl.heuristic.selector.value.decorator.InitializedValueSelector

      `bailOutEnabled, childValueSelector, variableDescriptor`

    - ### Fields inherited from class org.optaplanner.core.impl.heuristic.selector.AbstractSelector

      `logger, phaseLifecycleSupport, workingRandom`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EntityIndependentInitializedValueSelector​(EntityIndependentValueSelector<Solution_> childValueSelector)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected long` | `determineBailOutSize()` |
    `long` | `getSize()` | A random JIT `Selector` with `Selector.isNeverEnding()` true should return a size as if it would be able to return each distinct element only once, because the size can be used in `SelectionProbabilityWeightFactory`.
    `Iterator<Object>` | `iterator()` |

    - ### Methods inherited from class org.optaplanner.core.impl.heuristic.selector.value.decorator.InitializedValueSelector

      `accept, create, determineBailOutSize, endingIterator, getSize, getVariableDescriptor, isCountable, isNeverEnding, iterator, toString`

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

      `getCacheType, phaseEnded, phaseStarted, solvingEnded, solvingStarted, stepEnded, stepStarted`

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

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

    - ### Methods inherited from interface org.optaplanner.core.impl.heuristic.selector.IterableSelector

      `spliterator`

    - ### Methods inherited from interface org.optaplanner.core.impl.phase.event.PhaseLifecycleListener

      `phaseEnded, phaseStarted, stepEnded, stepStarted`

    - ### Methods inherited from interface org.optaplanner.core.impl.heuristic.selector.Selector

      `getCacheType, isCountable, isNeverEnding`

    - ### Methods inherited from interface org.optaplanner.core.impl.solver.event.SolverLifecycleListener

      `solvingEnded, solvingStarted`

    - ### Methods inherited from interface org.optaplanner.core.impl.heuristic.selector.value.ValueSelector

      `endingIterator, getSize, getVariableDescriptor, iterator`

- - ### Constructor Detail

    - #### EntityIndependentInitializedValueSelector

          public EntityIndependentInitializedValueSelector​(EntityIndependentValueSelector<Solution_> childValueSelector)

  - ### Method Detail

    - #### getSize

          public long getSize()

      Description copied from interface: `IterableSelector`
      A random JIT `Selector` with `Selector.isNeverEnding()` true should return a size as if it would be able to return each distinct element only once, because the size can be used in `SelectionProbabilityWeightFactory`.
      Specified by:
        `getSize` in interface `IterableSelector<Solution_,​Object>`
      Returns:
        the approximate number of elements generated by this `Selector`, always `>= 0`

    - #### iterator

          public Iterator<Object> iterator()

      Specified by:
        `iterator` in interface `Iterable<Solution_>`

    - #### determineBailOutSize

          protected long determineBailOutSize()