Class Engine.StateCommand<T>

  • Type Parameters:
    T - concentration
    Enclosing class:
    Engine<T>

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

      Constructors 
      Constructor Description
      StateCommand()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      it.unibo.alchemist.core.interfaces.Command<T> build()
      Performs the building of a Command according to the previously called methods.
      Engine.StateCommand<T> pause()
      Sets the desired status to PAUSED.
      Engine.StateCommand<T> run()
      Sets the desired status to RUNNING.
      Engine.StateCommand<T> stop()
      Sets the desired status to {#@link Status#STOPPED}.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StateCommand

        public StateCommand()
    • Method Detail

      • 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