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

## Interface SelectionFilter<Solution_,T>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
    `T` - the selection type
  All Known Subinterfaces:
    PlanningEntity.NullMovableEntitySelectionFilter, PlanningVariable.NullReinitializeVariableEntityFilter
  All Known Implementing Classes:
    CompositeSelectionFilter, MovableChainedTrailingValueFilter, NullValueReinitializeVariableEntityFilter, PinEntityFilter

      public interface SelectionFilter<Solution_,T>

  Decides on accepting or discarding a selection (which is a `PlanningEntity`, a planningValue, a `Move` or a `Selector`). For example, a pinned `PlanningEntity` is rejected and therefore never used in a `Move`.

  A filtered selection is considered as not selected, it does not count as an unaccepted selection.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `accept(ScoreDirector<Solution_> scoreDirector, T selection)`

- - ### Method Detail

    - #### accept

          boolean accept(ScoreDirector<Solution_> scoreDirector,
                         T selection)

      Parameters:
        `scoreDirector` - never null, the `ScoreDirector` which has the `ScoreDirector.getWorkingSolution()` to which the selection belongs or applies to
        `selection` - never null, a `PlanningEntity`, a planningValue, a `Move` or a `Selector`
      Returns:
        true if the selection is accepted (for example it is movable), false if the selection will be discarded (for example it is pinned)

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