Class MoveAdapters
java.lang.Object
ai.timefold.solver.core.impl.heuristic.move.MoveAdapters
While the Neighborhoods API and Move Selectors API need to coexist,
there are places where moves need to be converted between the old and new types.
This class provides static methods to perform these conversions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <Solution_>
booleanisDoable(MoveDirector<Solution_, ?> moveDirector, Move<Solution_> move) Used to determine if a move is doable.static <Solution_>
booleantestWhenLegacyMove(Move<Solution_> move, Predicate<Move<Solution_>> predicate) toLegacyMoveIterator(Iterator<Move<Solution_>> newIterator) static <Solution_>
Move<Solution_>
-
Method Details
-
unadapt
-
toLegacyMoveIterator
-
isDoable
public static <Solution_> boolean isDoable(MoveDirector<Solution_, ?> moveDirector, Move<Solution_> move) Used to determine if a move is doable. A move is only doable if:- It is a new
Move. - It is a legacy move and its
Move.isMoveDoable(ScoreDirector)returntrue.
- Parameters:
moveDirector- never nullmove- never null- Returns:
- true if the move is doable
- It is a new
-
testWhenLegacyMove
-