Enum Class Health
- All Implemented Interfaces:
Serializable,Comparable<Health>,Constable
Indicates the health of a person.
- Author:
- maartenl
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic HealthReturns the health based on provided ordinal value.static HealthReturns the health based on a description.Returns the description of this enum.static HealthReturns the health of the character.intReturns the integer indicating the health.static Integermax()static Integermin()static HealthReturns the enum constant of this class with the specified name.static Health[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AT_DEATH
-
VERY_BAD
-
BAD
-
TERRIBLY_HURT
-
EXTREMELY_HURT
-
QUITE_HURT
-
HURT
-
SLIGHTLY_HURT
-
QUITE_NICE
-
NICE
-
WELL
-
VERY_WELL
-
-
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
-
min
-
max
-
getHealth
-
get
-
get
-
getDescription
Returns the description of this enum.- Returns:
- for example "at death's door"
-
getOrdinalValue
public int getOrdinalValue()Returns the integer indicating the health.- Returns:
- integer
-