Interface SelectionFilter<Solution_,T>
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotationT
- the selection type
- All Known Implementing Classes:
CompositeSelectionFilter
,MovableChainedTrailingValueFilter
,PinEntityFilter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
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.
Implementations are expected to be stateless. The solver may choose to reuse instances.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(ScoreDirector<Solution_> scoreDirector, T selection)
-
Method Details
-
accept
- 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)
-