Package org.optaplanner.core.impl.heuristic.selector.common.iterator

## Class AbstractOriginalSwapIterator<Solution_,​Move_ extends Move<Solution_>,​SubSelection_>

- java.lang.Object
- - org.optaplanner.core.impl.heuristic.selector.common.iterator.SelectionIterator<S>
  - - org.optaplanner.core.impl.heuristic.selector.common.iterator.UpcomingSelectionIterator<Move_>
    - - org.optaplanner.core.impl.heuristic.selector.common.iterator.AbstractOriginalSwapIterator<Solution_,​Move_,​SubSelection_>

- All Implemented Interfaces:
    `Iterator<Move_>`

      public abstract class AbstractOriginalSwapIterator<Solution_,​Move_ extends Move<Solution_>,​SubSelection_>
      extends UpcomingSelectionIterator<Move_>

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected boolean` | `leftEqualsRight` |
    `protected ListIterable<SubSelection_>` | `leftSubSelector` |
    `protected ListIterable<SubSelection_>` | `rightSubSelector` |

    - ### Fields inherited from class org.optaplanner.core.impl.heuristic.selector.common.iterator.UpcomingSelectionIterator

      `hasUpcomingSelection, upcomingCreated, upcomingSelection`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractOriginalSwapIterator​(ListIterable<SubSelection_> leftSubSelector, ListIterable<SubSelection_> rightSubSelector)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected Move_` | `createUpcomingSelection()` |
    `static <Solution_,​SubSelection_> long` | `getSize​(ListIterableSelector<Solution_,​SubSelection_> leftSubSelector, ListIterableSelector<Solution_,​SubSelection_> rightSubSelector)` |
    `protected abstract Move_` | `newSwapSelection​(SubSelection_ leftSubSelection, SubSelection_ rightSubSelection)` |

    - ### Methods inherited from class org.optaplanner.core.impl.heuristic.selector.common.iterator.UpcomingSelectionIterator

      `hasNext, next, noUpcomingSelection, toString`

    - ### Methods inherited from class org.optaplanner.core.impl.heuristic.selector.common.iterator.SelectionIterator

      `remove`

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

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

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining`

- - ### Field Detail

    - #### leftSubSelector

          protected final ListIterable<SubSelection_> leftSubSelector

    - #### rightSubSelector

          protected final ListIterable<SubSelection_> rightSubSelector

    - #### leftEqualsRight

          protected final boolean leftEqualsRight

  - ### Constructor Detail

    - #### AbstractOriginalSwapIterator

          public AbstractOriginalSwapIterator​(ListIterable<SubSelection_> leftSubSelector,
                                              ListIterable<SubSelection_> rightSubSelector)

  - ### Method Detail

    - #### getSize

          public static <Solution_,​SubSelection_> long getSize​(ListIterableSelector<Solution_,​SubSelection_> leftSubSelector,
                                                                     ListIterableSelector<Solution_,​SubSelection_> rightSubSelector)

    - #### createUpcomingSelection

          protected Move_ createUpcomingSelection()

      Specified by:
        `createUpcomingSelection` in class `UpcomingSelectionIterator<Move_ extends Move<Solution_>>`

    - #### newSwapSelection

          protected abstract Move_ newSwapSelection​(SubSelection_ leftSubSelection,
                                                    SubSelection_ rightSubSelection)