Class DefaultScheduleRegistry

java.lang.Object
repast.simphony.engine.environment.DefaultScheduleRegistry
All Implemented Interfaces:
ScheduleRegistry

public class DefaultScheduleRegistry extends Object implements ScheduleRegistry
Default implementation of a ScheduleRegistry.
Version:
$Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
Author:
Jerry Vos
See Also:
  • Constructor Details

    • DefaultScheduleRegistry

      public DefaultScheduleRegistry()
  • Method Details

    • getModelSchedule

      public ISchedule getModelSchedule()
      Retrieves the schedule that models should use to schedule their actions.
      Specified by:
      getModelSchedule in interface ScheduleRegistry
      Returns:
      the schedule to be used used by models
    • setModelSchedule

      public void setModelSchedule(ISchedule modelSchedule)
      Sets the schedule users should use to schedule their actions. Users should not use this method as it is intended for internal Repast use. If a user would like a custom schedule to be used they should specify a ScheduleFactory to the Controller.
      Specified by:
      setModelSchedule in interface ScheduleRegistry
      Parameters:
      modelSchedule - the schedule used by models
    • getPreRunActions

      public Iterable<IAction> getPreRunActions()
      Retrieves the actions that are to occur before a run of the model schedule.
      Specified by:
      getPreRunActions in interface ScheduleRegistry
      Returns:
      the actions that are to occur before a run of the model schedule
    • addPreRunAction

      public void addPreRunAction(IAction action)
      Adds an action that should occur before a run of the model schedule.
      Specified by:
      addPreRunAction in interface ScheduleRegistry
      Parameters:
      action - an action that should occur before a run of the model schedule
    • removePreRunAction

      public void removePreRunAction(IAction action)
      Removes an action from the actions that should occur before a run of the model schedule.
      Specified by:
      removePreRunAction in interface ScheduleRegistry
      Parameters:
      action - an action that should occur before a run of the model schedule
    • getPostRunActions

      public Iterable<IAction> getPostRunActions()
      Retrieves the actions that are to occur after a run of the model schedule.
      Specified by:
      getPostRunActions in interface ScheduleRegistry
      Returns:
      the actions that are to occur after a run of the model schedule
    • addPostRunAction

      public void addPostRunAction(IAction action)
      Adds an action that should occur after a run of the model schedule.
      Specified by:
      addPostRunAction in interface ScheduleRegistry
      Parameters:
      action - an action that should occur after a run of the model schedule
    • removePostRunAction

      public void removePostRunAction(IAction action)
      Removes an action from the actions that should occur after a run of the model schedule.
      Specified by:
      removePostRunAction in interface ScheduleRegistry
      Parameters:
      action - an action that should occur after a run of the model schedule
    • setScheduleRunner

      public void setScheduleRunner(Runner runner)
      Sets the runner used for executing the schedule.
      Specified by:
      setScheduleRunner in interface ScheduleRegistry
      Parameters:
      runner - the schedule runner
    • getScheduleRunner

      public Runner getScheduleRunner()
      Retrieves the runner used for executing the schedule.
      Specified by:
      getScheduleRunner in interface ScheduleRegistry
      Returns:
      the schedule runner