public enum PlanState extends java.lang.Enum<PlanState> implements java.io.Serializable
INACTIVE, RUNNING, ACHIEVED,
FAILED.
You can compare two PlanStates for equality with built-in
Enum.equals(Object) or with faster == operator. This holds even if the
class is deserialized from serialized form.
| Enum Constant and Description |
|---|
ACHIEVED
Achieved plan state
|
FAILED
Failed plan state
|
INACTIVE
Inactive plan state
|
RUNNING
Running plan state
|
| Modifier and Type | Field and Description |
|---|---|
static java.util.Set<PlanState> |
ACTIVE_PLAN_STATES
Set of active plan states.
|
static java.util.Set<PlanState> |
FINISHED_PLAN_STATES
Set of finished plan states.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
canBeChangedFromState(PlanState oldState)
Returns true if a plan can be changed from state
oldState
to this state. |
boolean |
canBeChangedToState(PlanState newState)
Returns true if a plan can be changed from this state to state
newState. |
static PlanState |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static PlanState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PlanState INACTIVE
public static final PlanState RUNNING
public static final PlanState ACHIEVED
public static final PlanState FAILED
public static final java.util.Set<PlanState> ACTIVE_PLAN_STATES
public static final java.util.Set<PlanState> FINISHED_PLAN_STATES
public static PlanState[] values()
for (PlanState c : PlanState.values()) System.out.println(c);
public static PlanState valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic abstract boolean canBeChangedFromState(PlanState oldState)
oldState
to this state.oldState - old plan stateoldState
to this statepublic final boolean canBeChangedToState(PlanState newState)
newState.newState - new plan statenewStateCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.