Package nl.tno.imb.mc
Enum ModelState
- java.lang.Object
-
- java.lang.Enum<ModelState>
-
- nl.tno.imb.mc.ModelState
-
- All Implemented Interfaces:
Serializable,Comparable<ModelState>
public enum ModelState extends Enum<ModelState>
The possible states of a model.
-
-
Field Summary
Fields Modifier and Type Field Description protected static Map<Integer,ModelState>commandMapMap to translate numeric value to enum.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static ModelStatebyValue(int value)Lookup the ModelState that corresponds to the value.intgetValue()Retrieve the integer value that represents this ModelState for transmission over IMB.static ModelStatevalueOf(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
-
READY
public static final ModelState READY
Ready.
-
CALCULATING
public static final ModelState CALCULATING
Calculating.
-
BUSY
public static final ModelState BUSY
Busy.
-
IDLE
public static final ModelState IDLE
Model is available for use.
-
LOCK
public static final ModelState LOCK
Claim model for use in this session.
-
UNLOCK
public static final ModelState UNLOCK
Free model to be used in other session.
-
REMOVED
public static final ModelState REMOVED
Model is no longer available.
-
-
Field Detail
-
commandMap
protected static Map<Integer,ModelState> commandMap
Map to translate numeric value to enum.
-
-
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
-
getValue
public int getValue()
Retrieve the integer value that represents this ModelState for transmission over IMB.- Returns:
- int; the value that represents this ModelState in transmission over IMB
-
byValue
protected static ModelState byValue(int value)
Lookup the ModelState that corresponds to the value.- Parameters:
value- int; the value to look up- Returns:
- ModelState; the ModelState that corresponds to the value, or null if no ModelState with the specified value is defined
-
-