Package org.optaplanner.core.impl.heuristic.selector.move.composite

## Class CompositeMoveSelector<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.heuristic.selector.AbstractSelector<Solution_>
  - - org.optaplanner.core.impl.heuristic.selector.move.AbstractMoveSelector<Solution_>
    - - org.optaplanner.core.impl.heuristic.selector.move.composite.CompositeMoveSelector<Solution_>

- All Implemented Interfaces:
    `Iterable<Move<Solution_>>`, `EventListener`, `IterableSelector<Solution_,​Move<Solution_>>`, `MoveSelector<Solution_>`, `Selector<Solution_>`, `PhaseLifecycleListener<Solution_>`, `SolverLifecycleListener<Solution_>`
  Direct Known Subclasses:
    `CartesianProductMoveSelector`, `UnionMoveSelector`

      public abstract class CompositeMoveSelector<Solution_>
      extends AbstractMoveSelector<Solution_>

  Abstract superclass for every composite `MoveSelector`.
  See Also:
    `MoveSelector`

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected List<MoveSelector<Solution_>>` | `childMoveSelectorList` |
    `protected boolean` | `randomSelection` |

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

      `logger, phaseLifecycleSupport, workingRandom`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `CompositeMoveSelector​(List<MoveSelector<Solution_>> childMoveSelectorList, boolean randomSelection)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `List<MoveSelector<Solution_>>` | `getChildMoveSelectorList()` |
    `boolean` | `isCountable()` | If false, then `Selector.isNeverEnding()` is true.
    `boolean` | `supportsPhaseAndSolverCaching()` |
    `String` | `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, iterator`

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

      `getSize, 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, isNeverEnding`

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

      `solvingEnded, solvingStarted`

- - ### Field Detail

    - #### childMoveSelectorList

          protected final List<MoveSelector<Solution_>> childMoveSelectorList

    - #### randomSelection

          protected final boolean randomSelection

  - ### Constructor Detail

    - #### CompositeMoveSelector

          protected CompositeMoveSelector​(List<MoveSelector<Solution_>> childMoveSelectorList,
                                          boolean randomSelection)

  - ### Method Detail

    - #### getChildMoveSelectorList

          public List<MoveSelector<Solution_>> getChildMoveSelectorList()

    - #### supportsPhaseAndSolverCaching

          public boolean supportsPhaseAndSolverCaching()

    - #### isCountable

          public boolean isCountable()

      Description copied from interface: `Selector`
      If false, then `Selector.isNeverEnding()` is true.
      Returns:
        true if all the `ValueRange`s are countable (for example a double value range between 1.2 and 1.4 is not countable)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`