Enum Class TimerActionResult
- All Implemented Interfaces:
Serializable
,Comparable<TimerActionResult>
,Constable
The result of a timer action.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFailed to start/stop timer due to an internal error.Failed to stop the existing timer, the timer is no longer active.Failed to start the timer, the timer with the specified name already exists.Failed to start a new timer due to reaching the limit for a number of active timers.The operation completed successfully. -
Method Summary
Modifier and TypeMethodDescriptionstatic TimerActionResult
fromOrdinal
(int val) Convert an ordinal into aTimerActionResult
.static TimerActionResult
Returns the enum constant of this class with the specified name.static TimerActionResult[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Success
The operation completed successfully. -
FailedTooManyTimers
Failed to start a new timer due to reaching the limit for a number of active timers. -
FailedNoSuchTimer
Failed to stop the existing timer, the timer is no longer active. -
FailedTimerAlreadyExists
Failed to start the timer, the timer with the specified name already exists. -
FailedInternalError
Failed to start/stop timer due to an internal error.
-
-
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
-
fromOrdinal
Convert an ordinal into aTimerActionResult
. 0 =Success
, 1 =FailedTooManyTimers
, 2 =FailedNoSuchTimer
, 3 =FailedTimerAlreadyExists
, 4 =FailedInternalError
- Parameters:
val
- the ordinal value.- Returns:
- the associated
TimerActionResult
or throws an IllegalArgumentException for an unexpected ordinal value.
-