Package org.sim0mq.federationmanager
Enum ModelState
- java.lang.Object
-
- java.lang.Enum<ModelState>
-
- org.sim0mq.federationmanager.ModelState
-
- All Implemented Interfaces:
Serializable
,Comparable<ModelState>
public enum ModelState extends Enum<ModelState>
State of a model, to be used in a state transition model of model execution by a FederationManager.Copyright (c) 2016-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Apr 20, 2017
BSD-style license. See Sim0MQ License.- Author:
- Alexander Verbraeck
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ERROR
Error occurred.NOT_STARTED
Model has not yet been started.PARAMETERS
Parameter(s) have been sent.RUNCONTROL
SimRunControl has been sent.SIMULATORENDED
Simulator has ended.SIMULATORSTARTED
Simulator has been started.STARTED
Model has been started, e.g.STATISTICSGATHERED
Statistics have been gathered.TERMINATED
Model terminated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isError()
Return whether the federation is in the error state.boolean
isNotStarted()
Return whether the model has not yet started.boolean
isParameters()
Return whether the parameter(s) have been sent.boolean
isRunControl()
Return whether the run control has been sent.boolean
isSimulatorEnded()
Return whether the simulator has ended.boolean
isSimulatorStarted()
Return whether the simulator has been started.boolean
isStarted()
Return whether the model has passed the started phase.boolean
isStatisticsGathered()
Return whether the statistics have been gathered.boolean
isTerminated()
Return whether the model has been terminated.static ModelState
valueOf(String name)
Returns the enum constant of this type with the specified name.static ModelState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NOT_STARTED
public static final ModelState NOT_STARTED
Model has not yet been started.
-
STARTED
public static final ModelState STARTED
Model has been started, e.g. by a FederateStarter.
-
RUNCONTROL
public static final ModelState RUNCONTROL
SimRunControl has been sent.
-
PARAMETERS
public static final ModelState PARAMETERS
Parameter(s) have been sent.
-
SIMULATORSTARTED
public static final ModelState SIMULATORSTARTED
Simulator has been started.
-
SIMULATORENDED
public static final ModelState SIMULATORENDED
Simulator has ended.
-
STATISTICSGATHERED
public static final ModelState STATISTICSGATHERED
Statistics have been gathered.
-
TERMINATED
public static final ModelState TERMINATED
Model terminated.
-
ERROR
public static final ModelState ERROR
Error occurred. Sequence should stop.
-
-
Method Detail
-
values
public static ModelState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ModelState c : ModelState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ModelState valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isNotStarted
public boolean isNotStarted()
Return whether the model has not yet started.- Returns:
- boolean; whether the model has not yet started
-
isStarted
public boolean isStarted()
Return whether the model has passed the started phase.- Returns:
- boolean; whether the model has passed the started phase
-
isRunControl
public boolean isRunControl()
Return whether the run control has been sent.- Returns:
- boolean; whether the run control has been sent
-
isParameters
public boolean isParameters()
Return whether the parameter(s) have been sent.- Returns:
- boolean; whether the parameter(s) have been sent
-
isSimulatorStarted
public boolean isSimulatorStarted()
Return whether the simulator has been started.- Returns:
- boolean; whether the simulator has been started
-
isSimulatorEnded
public boolean isSimulatorEnded()
Return whether the simulator has ended.- Returns:
- boolean; whether the simulator has ended
-
isStatisticsGathered
public boolean isStatisticsGathered()
Return whether the statistics have been gathered.- Returns:
- boolean; whether the statistics have been gathered
-
isTerminated
public boolean isTerminated()
Return whether the model has been terminated.- Returns:
- boolean; whether the model has been terminated
-
isError
public boolean isError()
Return whether the federation is in the error state.- Returns:
- boolean; whether the federation is in the error state
-
-