Class PredecessorsDoneDateUpdatingVariableListener
java.lang.Object
org.optaplanner.examples.projectjobscheduling.domain.solver.PredecessorsDoneDateUpdatingVariableListener
- All Implemented Interfaces:
Closeable,AutoCloseable,org.optaplanner.core.api.domain.variable.AbstractVariableListener<Schedule,,Allocation> 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidafterEntityAdded(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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.optaplanner.core.api.domain.variable.AbstractVariableListener
close, resetWorkingSolutionMethods inherited from interface org.optaplanner.core.api.domain.variable.VariableListener
requiresUniqueEntityEvents
-
Constructor Details
-
PredecessorsDoneDateUpdatingVariableListener
public PredecessorsDoneDateUpdatingVariableListener()
-
-
Method Details
-
beforeEntityAdded
public void beforeEntityAdded(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation) - Specified by:
beforeEntityAddedin interfaceorg.optaplanner.core.api.domain.variable.AbstractVariableListener<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.AbstractVariableListener<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.AbstractVariableListener<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.AbstractVariableListener<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
-