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 Health
Returns the health based on provided ordinal value.static Health
Returns the health based on a description.Returns the description of this enum.static Health
Returns the health of the character.int
Returns the integer indicating the health.static Integer
max()
static Integer
min()
static Health
Returns 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
-