Package org.optaplanner.core.impl.constructionheuristic.decider.forager

## Class DefaultConstructionHeuristicForager<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter<Solution_>
  - - org.optaplanner.core.impl.constructionheuristic.event.ConstructionHeuristicPhaseLifecycleListenerAdapter<Solution_>
    - - org.optaplanner.core.impl.constructionheuristic.decider.forager.AbstractConstructionHeuristicForager<Solution_>
      - - org.optaplanner.core.impl.constructionheuristic.decider.forager.DefaultConstructionHeuristicForager<Solution_>

- All Implemented Interfaces:
    `EventListener`, `ConstructionHeuristicForager<Solution_>`, `ConstructionHeuristicPhaseLifecycleListener<Solution_>`, `SolverLifecycleListener<Solution_>`

      public class DefaultConstructionHeuristicForager<Solution_>
      extends AbstractConstructionHeuristicForager<Solution_>

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected ConstructionHeuristicMoveScope<Solution_>` | `earlyPickedMoveScope` |
    `protected ConstructionHeuristicMoveScope<Solution_>` | `maxScoreMoveScope` |
    `protected ConstructionHeuristicPickEarlyType` | `pickEarlyType` |
    `protected Comparator<Score>` | `scoreComparator` |
    `protected long` | `selectedMoveCount` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultConstructionHeuristicForager​(ConstructionHeuristicPickEarlyType pickEarlyType)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addMove​(ConstructionHeuristicMoveScope<Solution_> moveScope)` |
    `protected void` | `checkPickEarly​(ConstructionHeuristicMoveScope<Solution_> moveScope)` |
    `boolean` | `isQuitEarly()` |
    `ConstructionHeuristicMoveScope<Solution_>` | `pickMove​(ConstructionHeuristicStepScope<Solution_> stepScope)` |
    `void` | `stepEnded​(ConstructionHeuristicStepScope<Solution_> stepScope)` |
    `void` | `stepStarted​(ConstructionHeuristicStepScope<Solution_> stepScope)` |

    - ### Methods inherited from class org.optaplanner.core.impl.constructionheuristic.event.ConstructionHeuristicPhaseLifecycleListenerAdapter

      `phaseEnded, phaseStarted`

    - ### Methods inherited from class org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter

      `solvingEnded, solvingStarted`

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

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

    - ### Methods inherited from interface org.optaplanner.core.impl.constructionheuristic.event.ConstructionHeuristicPhaseLifecycleListener

      `phaseEnded, phaseStarted`

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

      `solvingEnded, solvingStarted`

- - ### Field Detail

    - #### pickEarlyType

          protected final ConstructionHeuristicPickEarlyType pickEarlyType

    - #### scoreComparator

          protected final Comparator<Score> scoreComparator

    - #### selectedMoveCount

          protected long selectedMoveCount

    - #### earlyPickedMoveScope

          protected ConstructionHeuristicMoveScope<Solution_> earlyPickedMoveScope

    - #### maxScoreMoveScope

          protected ConstructionHeuristicMoveScope<Solution_> maxScoreMoveScope

  - ### Constructor Detail

    - #### DefaultConstructionHeuristicForager

          public DefaultConstructionHeuristicForager​(ConstructionHeuristicPickEarlyType pickEarlyType)

  - ### Method Detail

    - #### stepStarted

          public void stepStarted​(ConstructionHeuristicStepScope<Solution_> stepScope)

      Specified by:
        `stepStarted` in interface `ConstructionHeuristicPhaseLifecycleListener<Solution_>`
      Overrides:
        `stepStarted` in class `ConstructionHeuristicPhaseLifecycleListenerAdapter<Solution_>`

    - #### stepEnded

          public void stepEnded​(ConstructionHeuristicStepScope<Solution_> stepScope)

      Specified by:
        `stepEnded` in interface `ConstructionHeuristicPhaseLifecycleListener<Solution_>`
      Overrides:
        `stepEnded` in class `ConstructionHeuristicPhaseLifecycleListenerAdapter<Solution_>`

    - #### addMove

          public void addMove​(ConstructionHeuristicMoveScope<Solution_> moveScope)

    - #### checkPickEarly

          protected void checkPickEarly​(ConstructionHeuristicMoveScope<Solution_> moveScope)

    - #### isQuitEarly

          public boolean isQuitEarly()

    - #### pickMove

          public ConstructionHeuristicMoveScope<Solution_> pickMove​(ConstructionHeuristicStepScope<Solution_> stepScope)