Class Engine.StateCommand<T>
java.lang.Object
it.unibo.alchemist.core.implementations.Engine.StateCommand<T>
- Type Parameters:
T- concentration
This class provides a flexible Builder to create a new Command
whose aim is to change the status of an Engine.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionit.unibo.alchemist.core.interfaces.Command<T>build()Performs the building of a Command according to the previously called methods.pause()Sets the desired status toPAUSED.run()Sets the desired status to RUNNING.stop()Sets the desired status to {#@link Status#STOPPED}.
-
Constructor Details
-
StateCommand
public StateCommand()
-
-
Method Details
-
run
Sets the desired status to RUNNING. Calling this method overrides an eventual previous call topause()and\orstop().- Returns:
- the current builder with the updated status
-
pause
Sets the desired status toPAUSED. Calling this method overrides an eventual previous call torun()and\orstop().- Returns:
- the current builder with the updated status
-
stop
Sets the desired status to {#@link Status#STOPPED}. Calling this method overrides an eventual previous call topause()and\orrun().- Returns:
- the current builder with the updated status
-
build
Performs the building of a Command according to the previously called methods.- Returns:
- the generated Command
-