Package edu.cnu.mdi.sim
Enum Class SimulationState
- All Implemented Interfaces:
Serializable,Comparable<SimulationState>,Constable
Simulation engine states. These represent what the engine "is" currently
doing.
States are owned and managed by SimulationEngine. Clients typically
observe state transitions via
SimulationListener.onStateChange(SimulationContext, SimulationState, SimulationState, String).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe engine encountered an unrecoverable error.Simulation.init(SimulationContext)is being executed on the simulation thread.Engine created but not started.The engine is paused and not executing steps.Initialization is complete; engine is ready to run.The engine is actively executingSimulation.step(SimulationContext)in a loop.The simulation ended normally (or via stop/cancel) and shutdown has completed.The engine is terminating due to stop/cancel/completion. -
Method Summary
Modifier and TypeMethodDescriptionstatic SimulationStateReturns the enum constant of this class with the specified name.static SimulationState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NEW
Engine created but not started. -
INITIALIZING
Simulation.init(SimulationContext)is being executed on the simulation thread. -
READY
Initialization is complete; engine is ready to run. -
RUNNING
The engine is actively executingSimulation.step(SimulationContext)in a loop. -
PAUSED
The engine is paused and not executing steps. It can be resumed. -
TERMINATING
The engine is terminating due to stop/cancel/completion. -
TERMINATED
The simulation ended normally (or via stop/cancel) and shutdown has completed. -
FAILED
The engine encountered an unrecoverable error.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-