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 Constructor Description PredecessorsDoneDateUpdatingVariableListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterEntityAdded(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
void
afterEntityRemoved(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
void
afterVariableChanged(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
void
beforeEntityAdded(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
void
beforeEntityRemoved(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
void
beforeVariableChanged(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
protected void
updateAllocation(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation originalAllocation)
protected boolean
updatePredecessorsDoneDate(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:
beforeEntityAdded
in 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:
afterEntityAdded
in 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:
beforeVariableChanged
in 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:
afterVariableChanged
in 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:
beforeEntityRemoved
in 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:
afterEntityRemoved
in 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
-
-