Enum Class Priority
- All Implemented Interfaces:
Serializable, Comparable<Priority>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAbsolute highest priority, should only be used for when a task is blocking a time-critical thread.Priority value indicating the task has completed or is being completed.One priority above normal.Two priorities above normal.Should only be used for urgent but not time-critical tasks.Use for tasks that can be delayed indefinitely.One priority below normal.Two priorities below normal.Use for tasks that should eventually execute, but are not needed to.Default priority. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intstatic final intincludes special prioritiesstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic PrioritygetPriority(int priority) booleanisHigherOrEqualPriority(int than) static booleanisHigherOrEqualPriority(int priority, int than) booleanbooleanisHigherPriority(int than) static booleanisHigherPriority(int priority, int than) booleanisHigherPriority(Priority than) booleanisLowerOrEqualPriority(int than) static booleanisLowerOrEqualPriority(int priority, int than) booleanbooleanisLowerPriority(int than) static booleanisLowerPriority(int priority, int than) booleanisLowerPriority(Priority than) static booleanisValidPriority(Priority priority) static Prioritystatic Prioritystatic PriorityReturns the enum constant of this class with the specified name.static Priority[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COMPLETING
Priority value indicating the task has completed or is being completed. This priority cannot be used to schedule tasks. -
BLOCKING
Absolute highest priority, should only be used for when a task is blocking a time-critical thread. -
HIGHEST
Should only be used for urgent but not time-critical tasks. -
HIGHER
Two priorities above normal. -
HIGH
One priority above normal. -
NORMAL
Default priority. -
LOW
One priority below normal. -
LOWER
Two priorities below normal. -
LOWEST
Use for tasks that should eventually execute, but are not needed to. -
IDLE
Use for tasks that can be delayed indefinitely.
-
-
Field Details
-
TOTAL_PRIORITIES
public static final int TOTAL_PRIORITIESincludes special priorities -
TOTAL_SCHEDULABLE_PRIORITIES
public static final int TOTAL_SCHEDULABLE_PRIORITIES -
priority
public final int priority
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
isValidPriority
-
max
-
min
-
isHigherOrEqualPriority
-
isHigherPriority
-
isLowerOrEqualPriority
-
isLowerPriority
-
isHigherOrEqualPriority
public boolean isHigherOrEqualPriority(int than) -
isHigherPriority
public boolean isHigherPriority(int than) -
isLowerOrEqualPriority
public boolean isLowerOrEqualPriority(int than) -
isLowerPriority
public boolean isLowerPriority(int than) -
isHigherOrEqualPriority
public static boolean isHigherOrEqualPriority(int priority, int than) -
isHigherPriority
public static boolean isHigherPriority(int priority, int than) -
isLowerOrEqualPriority
public static boolean isLowerOrEqualPriority(int priority, int than) -
isLowerPriority
public static boolean isLowerPriority(int priority, int than) -
getPriority
-