Class PinEntityFilter<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.heuristic.selector.entity.decorator.PinEntityFilter<Solution_>
-
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation
- All Implemented Interfaces:
SelectionFilter<Solution_,Object>
public class PinEntityFilter<Solution_> extends Object implements SelectionFilter<Solution_,Object>
Filters out entities that return true for thePlanningPin
annotated boolean member.
-
-
Constructor Summary
Constructors Constructor Description PinEntityFilter(MemberAccessor memberAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(ScoreDirector<Solution_> scoreDirector, Object entity)
-
-
-
Constructor Detail
-
PinEntityFilter
public PinEntityFilter(MemberAccessor memberAccessor)
-
-
Method Detail
-
accept
public boolean accept(ScoreDirector<Solution_> scoreDirector, Object entity)
- Specified by:
accept
in interfaceSelectionFilter<Solution_,Object>
- Parameters:
scoreDirector
- never null, theScoreDirector
which has theScoreDirector.getWorkingSolution()
to which the selection belongs or applies toentity
- 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)
-
-