Class Engine.StateCommand<T>

java.lang.Object
it.unibo.alchemist.core.implementations.Engine.StateCommand<T>
Type Parameters:
T - concentration
Enclosing class:
Engine<T>

public static class Engine.StateCommand<T> extends Object
This class provides a flexible Builder to create a new Command whose aim is to change the status of an Engine.
  • Constructor Details

    • StateCommand

      public StateCommand()
  • Method Details

    • run

      public Engine.StateCommand<T> run()
      Sets the desired status to RUNNING. Calling this method overrides an eventual previous call to pause() and\or stop().
      Returns:
      the current builder with the updated status
    • pause

      public Engine.StateCommand<T> pause()
      Sets the desired status to PAUSED. Calling this method overrides an eventual previous call to run() and\or stop().
      Returns:
      the current builder with the updated status
    • stop

      public Engine.StateCommand<T> stop()
      Sets the desired status to {#@link Status#STOPPED}. Calling this method overrides an eventual previous call to pause() and\or run().
      Returns:
      the current builder with the updated status
    • build

      public it.unibo.alchemist.core.interfaces.Command<T> build()
      Performs the building of a Command according to the previously called methods.
      Returns:
      the generated Command