- All Implemented Interfaces:
Serializable,Comparable<WorkWeight>,Constable
Categorizes tasks based on their difficulty or effort level.
Provides predefined difficulty levels from very easy to very hard.
Each category has a numeric value for computational purposes and a human-readable description.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkWeightfromInt(int workWeight) Finds the WorkWeight enum constant corresponding to a numeric value.toString()Returns the human-readable difficulty description.static WorkWeightReturns the enum constant of this class with the specified name.static WorkWeight[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VERY_EASY
-
EASY
-
MEDIUM
-
HARD
-
VERY_HARD
-
-
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
-
fromInt
Finds the WorkWeight enum constant corresponding to a numeric value.- Parameters:
workWeight- The numeric value to convert (1-5)- Returns:
- The matching WorkWeight, or EASY if no match is found
-
toString
Returns the human-readable difficulty description.- Overrides:
toStringin classEnum<WorkWeight>- Returns:
- The difficulty level as a string (e.g., "Medium")
-