public enum TaskState extends Enum<TaskState>
Enum Constant and Description |
---|
COMPLETED
Value representing successfully completed task (with no errors).
|
FAILED
Value representing failed task.
|
READY
Value representing task waiting in executor queue.
|
RUNNING
Value representing running task.
|
Modifier and Type | Field and Description |
---|---|
private static String |
COMPLETED_STR
A
String representation of COMPLETED value. |
private static String |
FAILED_STR
A
String representation of FAILED value. |
private static String |
READY_STR
A
String representation of READY value. |
private static String |
RUNNING_STR
A
String representation of RUNNING value. |
private static Map<String,TaskState> |
stringValuesMap
Stored
String values for backward String
conversion. |
Modifier and Type | Method and Description |
---|---|
String |
toString()
Convert
TaskState value to String . |
static TaskState |
toValue(String stateStr)
Returns a
TaskState with a value represented by the
specified String . |
static TaskState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TaskState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TaskState READY
public static final TaskState RUNNING
public static final TaskState COMPLETED
public static final TaskState FAILED
private static final String READY_STR
String
representation of READY value.private static final String RUNNING_STR
String
representation of RUNNING value.private static final String COMPLETED_STR
String
representation of COMPLETED value.private static final String FAILED_STR
String
representation of FAILED value.public static TaskState[] values()
for (TaskState c : TaskState.values()) System.out.println(c);
public static TaskState 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 static TaskState toValue(String stateStr)
TaskState
with a value represented by the
specified String
. The TaskState
returned
represents existing value only if specified String
matches any String
returned by toString
method.
Otherwise null
value is returned.
stateStr
- Value containing TaskState
toString
representation.TaskState
value represented by String
or null
if value was not recognized.Copyright © 2013. All Rights Reserved.