Package org.optaplanner.core.impl.localsearch.decider.acceptor

## Class CompositeAcceptor<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter<Solution_>
  - - org.optaplanner.core.impl.localsearch.event.LocalSearchPhaseLifecycleListenerAdapter<Solution_>
    - - org.optaplanner.core.impl.localsearch.decider.acceptor.AbstractAcceptor<Solution_>
      - - org.optaplanner.core.impl.localsearch.decider.acceptor.CompositeAcceptor<Solution_>

- All Implemented Interfaces:
    `EventListener`, `Acceptor<Solution_>`, `LocalSearchPhaseLifecycleListener<Solution_>`, `SolverLifecycleListener<Solution_>`

      public class CompositeAcceptor<Solution_>
      extends AbstractAcceptor<Solution_>

  Combines several acceptors into one. Does a logical AND over the accepted status of its acceptors. For example: combine planning entity and planning value tabu to do tabu on both.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected List<Acceptor<Solution_>>` | `acceptorList` |

    - ### Fields inherited from class org.optaplanner.core.impl.localsearch.decider.acceptor.AbstractAcceptor

      `logger`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CompositeAcceptor​(List<Acceptor<Solution_>> acceptorList)` |
    `CompositeAcceptor​(Acceptor<Solution_>... acceptors)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `isAccepted​(LocalSearchMoveScope<Solution_> moveScope)` |
    `void` | `phaseEnded​(LocalSearchPhaseScope<Solution_> phaseScope)` |
    `void` | `phaseStarted​(LocalSearchPhaseScope<Solution_> phaseScope)` |
    `void` | `solvingEnded​(SolverScope<Solution_> solverScope)` |
    `void` | `solvingStarted​(SolverScope<Solution_> solverScope)` |
    `void` | `stepEnded​(LocalSearchStepScope<Solution_> stepScope)` |
    `void` | `stepStarted​(LocalSearchStepScope<Solution_> stepScope)` |

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

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

- - ### Field Detail

    - #### acceptorList

          protected final List<Acceptor<Solution_>> acceptorList

  - ### Constructor Detail

    - #### CompositeAcceptor

          public CompositeAcceptor​(List<Acceptor<Solution_>> acceptorList)

    - #### CompositeAcceptor

          public CompositeAcceptor​(Acceptor<Solution_>... acceptors)

  - ### Method Detail

    - #### solvingStarted

          public void solvingStarted​(SolverScope<Solution_> solverScope)

      Specified by:
        `solvingStarted` in interface `SolverLifecycleListener<Solution_>`
      Overrides:
        `solvingStarted` in class `SolverLifecycleListenerAdapter<Solution_>`

    - #### phaseStarted

          public void phaseStarted​(LocalSearchPhaseScope<Solution_> phaseScope)

      Specified by:
        `phaseStarted` in interface `LocalSearchPhaseLifecycleListener<Solution_>`
      Overrides:
        `phaseStarted` in class `LocalSearchPhaseLifecycleListenerAdapter<Solution_>`

    - #### stepStarted

          public void stepStarted​(LocalSearchStepScope<Solution_> stepScope)

      Specified by:
        `stepStarted` in interface `LocalSearchPhaseLifecycleListener<Solution_>`
      Overrides:
        `stepStarted` in class `LocalSearchPhaseLifecycleListenerAdapter<Solution_>`

    - #### isAccepted

          public boolean isAccepted​(LocalSearchMoveScope<Solution_> moveScope)

      Parameters:
        `moveScope` - not null
      Returns:
        true if accepted

    - #### stepEnded

          public void stepEnded​(LocalSearchStepScope<Solution_> stepScope)

      Specified by:
        `stepEnded` in interface `LocalSearchPhaseLifecycleListener<Solution_>`
      Overrides:
        `stepEnded` in class `LocalSearchPhaseLifecycleListenerAdapter<Solution_>`

    - #### phaseEnded

          public void phaseEnded​(LocalSearchPhaseScope<Solution_> phaseScope)

      Specified by:
        `phaseEnded` in interface `LocalSearchPhaseLifecycleListener<Solution_>`
      Overrides:
        `phaseEnded` in class `LocalSearchPhaseLifecycleListenerAdapter<Solution_>`

    - #### solvingEnded

          public void solvingEnded​(SolverScope<Solution_> solverScope)

      Specified by:
        `solvingEnded` in interface `SolverLifecycleListener<Solution_>`
      Overrides:
        `solvingEnded` in class `SolverLifecycleListenerAdapter<Solution_>`