Enum Task.TaskPriority
- java.lang.Object
-
- java.lang.Enum<Task.TaskPriority>
-
- org.ametys.plugins.explorer.tasks.Task.TaskPriority
-
- All Implemented Interfaces:
Serializable
,Comparable<Task.TaskPriority>
- Enclosing interface:
- Task
public static enum Task.TaskPriority extends Enum<Task.TaskPriority>
Priority of a task
-
-
Field Summary
Fields Modifier and Type Field Description private I18nizableText
_label
private String
_value
-
Constructor Summary
Constructors Modifier Constructor Description private
TaskPriority(String value, I18nizableText label)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Task.TaskPriority
createsFromString(String priority)
Converts a string to a TaskPriorityI18nizableText
getLabel()
label getterString
toString()
static Task.TaskPriority
valueOf(String name)
Returns the enum constant of this type with the specified name.static Task.TaskPriority[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LOW
public static final Task.TaskPriority LOW
Low priority
-
NORMAL
public static final Task.TaskPriority NORMAL
Default priority
-
URGENT
public static final Task.TaskPriority URGENT
Urgent priority
-
-
Field Detail
-
_label
private I18nizableText _label
-
-
Constructor Detail
-
TaskPriority
private TaskPriority(String value, I18nizableText label)
-
-
Method Detail
-
values
public static Task.TaskPriority[] 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 (Task.TaskPriority c : Task.TaskPriority.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Task.TaskPriority 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
-
toString
public String toString()
- Overrides:
toString
in classEnum<Task.TaskPriority>
-
getLabel
public I18nizableText getLabel()
label getter- Returns:
- the task priority label
-
createsFromString
public static Task.TaskPriority createsFromString(String priority)
Converts a string to a TaskPriority- Parameters:
priority
- The priority to convert- Returns:
- The priority corresponding to the string or null if unknown
-
-