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 thePlanningSolution
annotationT
- the selection type
- All Implemented Interfaces:
SelectionFilter<Solution_,T>
public class CompositeSelectionFilter<Solution_,T> extends Object implements SelectionFilter<Solution_,T>
Combines severalSelectionFilter
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)
-
-
-
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 interfaceSelectionFilter<Solution_,T>
- Parameters:
scoreDirector
- never null, theScoreDirector
which has theScoreDirector.getWorkingSolution()
to which the selection belongs or applies toselection
- never null, aPlanningEntity
, a planningValue, aMove
or aSelector
- Returns:
- true if the selection is accepted (for example it is movable), false if the selection will be discarded (for example it is pinned)
-
-