public enum PlanState extends Enum<PlanState> implements Serializable
INACTIVE
, RUNNING
, ACHIEVED
,
FAILED
.
You can compare two PlanState
s 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 Set<PlanState> |
ACTIVE_PLAN_STATES
Set of active plan states.
|
static 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(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 PlanState[] values()
for (PlanState c : PlanState.values()) System.out.println(c);
public static PlanState valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- 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 statenewState
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.