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

## Class CompositeSelectionFilter<Solution_,​T>

- java.lang.Object
- - org.optaplanner.core.impl.heuristic.selector.common.decorator.CompositeSelectionFilter<Solution_,​T>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
    `T` - the selection type
  All Implemented Interfaces:
    `SelectionFilter<Solution_,​T>`

      public class CompositeSelectionFilter<Solution_,​T>
      extends Object
      implements SelectionFilter<Solution_,​T>

  Combines several `SelectionFilter`s into one. Does a logical AND over the accept status of its filters.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected List<SelectionFilter<Solution_,​T>>` | `selectionFilterList` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CompositeSelectionFilter​(List<SelectionFilter<Solution_,​T>> selectionFilterList)` |

  - ### Method Summary

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

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

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

- - ### Field Detail

    - #### selectionFilterList

          protected final List<SelectionFilter<Solution_,​T>> selectionFilterList

  - ### Constructor Detail

    - #### CompositeSelectionFilter

          public CompositeSelectionFilter​(List<SelectionFilter<Solution_,​T>> selectionFilterList)

  - ### Method Detail

    - #### accept

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

      Specified by:
        `accept` in interface `SelectionFilter<Solution_,​T>`
      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)