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