Package org.opt4j.core.optimizer
Enum Control.State
- java.lang.Object
-
- java.lang.Enum<Control.State>
-
- org.opt4j.core.optimizer.Control.State
-
- All Implemented Interfaces:
Serializable,Comparable<Control.State>
- Enclosing class:
- Control
public static enum Control.State extends Enum<Control.State>
TheControl.Stateof the control.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description PAUSEDThe paused state.RUNNINGThe running state.STOPPEDThe stopped state.TERMINATEDThe terminated state.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisPausable()Returnstrueif the current state allows to pause the optimization.booleanisStartable()Returnstrueif the current state allows to start the optimization.booleanisStoppable()Returnstrueif the current state allows to stop the optimization.static Control.StatevalueOf(String name)Returns the enum constant of this type with the specified name.static Control.State[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RUNNING
public static final Control.State RUNNING
The running state.
-
PAUSED
public static final Control.State PAUSED
The paused state.
-
STOPPED
public static final Control.State STOPPED
The stopped state.
-
TERMINATED
public static final Control.State TERMINATED
The terminated state.
-
-
Method Detail
-
values
public static Control.State[] 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 (Control.State c : Control.State.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Control.State 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
-
isStartable
public boolean isStartable()
Returnstrueif the current state allows to start the optimization.- Returns:
trueif start is available
-
isPausable
public boolean isPausable()
Returnstrueif the current state allows to pause the optimization.- Returns:
trueif pause is available
-
isStoppable
public boolean isStoppable()
Returnstrueif the current state allows to stop the optimization.- Returns:
trueif stop is available
-
-