Class ScheduleRunner

  • All Implemented Interfaces:
    Runner, Executor<RunState>

    public class ScheduleRunner
    extends Object
    implements Runner
    This class executes the model schedule found in the RunState's ScheduleRegistry.
    Nick Collier
    • Field Detail

      • stop

        protected boolean stop
      • pause

        protected boolean pause
      • step

        protected boolean step
    • Constructor Detail

      • ScheduleRunner

        public ScheduleRunner()
    • Method Detail

      • execute

        public void execute​(RunState toExecuteOn)
        This executes the given RunState object's schedule. It will continue executing the schedule until there are no more actions schedule or the run manager tells it to stop.
        Specified by:
        execute in interface Executor<RunState>
        toExecuteOn - the RunState to execute on
      • go

        public boolean go()
        Description copied from interface: Runner
        Specifies if the simulation should continue to run (returns true) or if it should stop (returns false).
        Specified by:
        go in interface Runner
        true if the runner should keep going
      • setPause

        public void setPause​(boolean pause)
        Specified by:
        setPause in interface Runner
      • step

        public void step()
        Specified by:
        step in interface Runner
      • stop

        public void stop()
        Specified by:
        stop in interface Runner
      • setTickListener

        public void setTickListener​(TickListener tickListener)
      • init

        public void init()
        Specified by:
        init in interface Runner
      • addRunListener

        public void addRunListener​(RunListener listener)
        Description copied from interface: Runner
        Adds the specified listener to the list of RunListener-s to be notified of any run related events, such as stopped, started, and so on.
        Specified by:
        addRunListener in interface Runner
        listener - the listener to add.
      • removeRunListener

        public void removeRunListener​(RunListener listener)
        Description copied from interface: Runner
        Removes the specified RunListener from the list for RunListener notified by this runner.
        Specified by:
        removeRunListener in interface Runner