Enum Class EventValue.Time
- All Implemented Interfaces:
Serializable,Comparable<EventValue.Time>,Constable
- Enclosing interface:
EventValue<E extends org.bukkit.event.Event,V>
Represents the time state an event value is registered for.
-
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 EventValue.Timeof(int value) Obtains the time state from its integer value.intvalue()static EventValue.TimeReturns the enum constant of this class with the specified name.static EventValue.Time[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PAST
The value as it was in the past (e.g. before the event occurred). -
NOW
The value as it is now (during the event). -
FUTURE
The value as it will be in the future (e.g. after the event).
-
-
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
-
value
public int value()- Returns:
- the integer value of this time state
-
of
Obtains the time state from its integer value.- Parameters:
value- the integer value- Returns:
- the corresponding time state
- Throws:
IllegalArgumentException- if the value is invalid
-