Class PredecessorsDoneDateUpdatingVariableListener
- java.lang.Object
-
- org.optaplanner.examples.projectjobscheduling.domain.solver.PredecessorsDoneDateUpdatingVariableListener
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.optaplanner.core.api.domain.variable.VariableListener<Schedule,Allocation>
public class PredecessorsDoneDateUpdatingVariableListener extends Object implements org.optaplanner.core.api.domain.variable.VariableListener<Schedule,Allocation>
-
-
Constructor Summary
Constructors Constructor Description PredecessorsDoneDateUpdatingVariableListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterEntityAdded(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)voidafterEntityRemoved(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)voidafterVariableChanged(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)voidbeforeEntityAdded(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)voidbeforeEntityRemoved(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)voidbeforeVariableChanged(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)protected voidupdateAllocation(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation originalAllocation)protected booleanupdatePredecessorsDoneDate(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
-
-
-
Method Detail
-
beforeEntityAdded
public void beforeEntityAdded(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
- Specified by:
beforeEntityAddedin interfaceorg.optaplanner.core.api.domain.variable.VariableListener<Schedule,Allocation>
-
afterEntityAdded
public void afterEntityAdded(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
- Specified by:
afterEntityAddedin interfaceorg.optaplanner.core.api.domain.variable.VariableListener<Schedule,Allocation>
-
beforeVariableChanged
public void beforeVariableChanged(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
- Specified by:
beforeVariableChangedin interfaceorg.optaplanner.core.api.domain.variable.VariableListener<Schedule,Allocation>
-
afterVariableChanged
public void afterVariableChanged(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
- Specified by:
afterVariableChangedin interfaceorg.optaplanner.core.api.domain.variable.VariableListener<Schedule,Allocation>
-
beforeEntityRemoved
public void beforeEntityRemoved(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
- Specified by:
beforeEntityRemovedin interfaceorg.optaplanner.core.api.domain.variable.VariableListener<Schedule,Allocation>
-
afterEntityRemoved
public void afterEntityRemoved(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
- Specified by:
afterEntityRemovedin interfaceorg.optaplanner.core.api.domain.variable.VariableListener<Schedule,Allocation>
-
updateAllocation
protected void updateAllocation(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation originalAllocation)
-
updatePredecessorsDoneDate
protected boolean updatePredecessorsDoneDate(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
- Parameters:
scoreDirector- never nullallocation- never null- Returns:
- true if the startDate changed
-
-