org.eclipse.ohf.stem.jobs.simulation
Enum SimulationState

java.lang.Object
  extended by java.lang.Enum<SimulationState>
      extended by org.eclipse.ohf.stem.jobs.simulation.SimulationState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SimulationState>

public enum SimulationState
extends java.lang.Enum<SimulationState>

This enumeration defines the states that a Simulation can be in.

See Also:
SimulationEvent, ISimulationListener, ISimulation

Enum Constant Summary
COMPLETED_CYCLE
          When the simulation has completed one cycle of a simulation sequence.
COMPLETED_SEQUENCE
          When the simulation has completed all of the sequences in the simulation.
PAUSED
          When the simulation is not scheduled for execution, but it still retains its scenario which maintains its state information.
RESET
          The Simulation's Scenario is being reset to its initial state.
RUNNING
          When the simulation has been scheduled for execution and is running.
STOPPED
          The simulation is being removed from the simulation manager and its state information destroyed.
 
Method Summary
static SimulationState valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SimulationState[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

RUNNING

public static final SimulationState RUNNING
When the simulation has been scheduled for execution and is running. This is the initial state of all newly created Simulations.

The next state is COMPLETED_CYCLE.

See Also:
COMPLETED_CYCLE

COMPLETED_CYCLE

public static final SimulationState COMPLETED_CYCLE
When the simulation has completed one cycle of a simulation sequence.

The next states are COMPLETED_CYCLE, COMPLETED_SEQUENCE, PAUSED, RESET, STOPPED.

See Also:
COMPLETED_CYCLE, COMPLETED_SEQUENCE, PAUSED, RESET, STOPPED

COMPLETED_SEQUENCE

public static final SimulationState COMPLETED_SEQUENCE
When the simulation has completed all of the sequences in the simulation.

The next states are COMPLETED_CYCLE, PAUSED, RESET, STOPPED.

See Also:
PAUSED, RESET, STOPPED

PAUSED

public static final SimulationState PAUSED
When the simulation is not scheduled for execution, but it still retains its scenario which maintains its state information. The Simulation can be scheduled again for execution.

The next states are RUNNING, RESET, STOPPED

See Also:
RUNNING, RESET, STOPPED

RESET

public static final SimulationState RESET
The Simulation's Scenario is being reset to its initial state. The Simulation can be scheduled for execution.

The next states are PAUSED, STOPPED

See Also:
PAUSED, STOPPED, Scenario.reset()

STOPPED

public static final SimulationState STOPPED
The simulation is being removed from the simulation manager and its state information destroyed.

See Also:
SimulationManager
Method Detail

values

public static final SimulationState[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(SimulationState c : SimulationState.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static SimulationState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name