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 Details

    • PredecessorsDoneDateUpdatingVariableListener

      public PredecessorsDoneDateUpdatingVariableListener()
  • Method Details

    • beforeEntityAdded

      public void beforeEntityAdded(org.optaplanner.core.api.score.director.ScoreDirector<Schedule> scoreDirector, Allocation allocation)
      Specified by:
      beforeEntityAdded in interface org.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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.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 null
      allocation - never null
      Returns:
      true if the startDate changed