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

## Class AbstractOriginalSwapIterator<S,SubS>

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

- All Implemented Interfaces:
    Iterator<S>

      public abstract class AbstractOriginalSwapIterator<S,SubS>
      extends UpcomingSelectionIterator<S>

- - ### Field Summary

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

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

      `hasUpcomingSelection, upcomingCreated, upcomingSelection`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractOriginalSwapIterator(ListIterable<SubS> leftSubSelector, ListIterable<SubS> rightSubSelector)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected S` | `createUpcomingSelection()`
    `static <SubS> long` | `getSize(ListIterableSelector leftSubSelector, ListIterableSelector rightSubSelector)`
    `protected abstract S` | `newSwapSelection(SubS leftSubSelection, SubS 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<SubS> leftSubSelector

    - #### rightSubSelector

          protected final ListIterable<SubS> rightSubSelector

    - #### leftEqualsRight

          protected final boolean leftEqualsRight

  - ### Constructor Detail

    - #### AbstractOriginalSwapIterator

          public AbstractOriginalSwapIterator(ListIterable<SubS> leftSubSelector,
                                              ListIterable<SubS> rightSubSelector)

  - ### Method Detail

    - #### getSize

          public static <SubS> long getSize(ListIterableSelector leftSubSelector,
                                            ListIterableSelector rightSubSelector)

    - #### createUpcomingSelection

          protected S createUpcomingSelection()

      Specified by:
        `createUpcomingSelection` in class `UpcomingSelectionIterator<S>`

    - #### newSwapSelection

          protected abstract S newSwapSelection(SubS leftSubSelection,
                                                SubS rightSubSelection)

Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.