public final class TimerPreserveMissed extends Object implements Serializable
Timer Facility
. A singleton instance of
each enumerated value is guaranteed (via an implementation of readResolve()
- refer java.io.Serializable
), so that equality tests
using ==
are always evaluated correctly. (This equality test is only
guaranteed if this class is loaded in the application's boot class path, rather
than dynamically loaded at runtime.)
The late-timer preservation options are:
Modifier and Type | Field and Description |
---|---|
static TimerPreserveMissed |
ALL
Preserve-missed value for the ALL option.
|
static String |
ALL_STRING
A string representation of
ALL . |
static TimerPreserveMissed |
LAST
Preserve-missed value for the LAST option.
|
static String |
LAST_STRING
A string representation of
LAST . |
static TimerPreserveMissed |
NONE
Preserve-missed value for the NONE option.
|
static String |
NONE_STRING
A string representation of
NONE . |
static int |
PRESERVE_ALL
An integer representation of
ALL . |
static int |
PRESERVE_LAST
An integer representation of
LAST . |
static int |
PRESERVE_NONE
An integer representation of
NONE . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compare this preserve-missed option object for equality with another.
|
static TimerPreserveMissed |
fromInt(int option)
Get a
TimerPreserveMissed object from an integer value. |
static TimerPreserveMissed |
fromString(String option)
Get a
TimerPreserveMissed object from a string value. |
int |
hashCode()
Get a hash code value for this preserve-missed option object.
|
boolean |
isAll()
Determine if this TimerPreserveMissed object represents the ALL option.
|
boolean |
isLast()
Determine if this TimerPreserveMissed object represents the LAST option.
|
boolean |
isNone()
Determine if this TimerPreserveMissed object represents the NONE option.
|
int |
toInt()
Get an integer value representation for this
TimerPreserveMissed object. |
String |
toString()
Get the textual representation of the TimerPreserveMissed object.
|
public static final int PRESERVE_NONE
NONE
.public static final int PRESERVE_ALL
ALL
.public static final int PRESERVE_LAST
LAST
.public static final String NONE_STRING
NONE
.public static final String ALL_STRING
ALL
.public static final String LAST_STRING
LAST
.public static final TimerPreserveMissed NONE
public static final TimerPreserveMissed ALL
public static final TimerPreserveMissed LAST
public static TimerPreserveMissed fromInt(int option) throws IllegalArgumentException
TimerPreserveMissed
object from an integer value.option
- the preserve-missed option as an integer.TimerPreserveMissed
object corresponding to option
.IllegalArgumentException
- if option
is not a valid
preserve-missed option value.public static TimerPreserveMissed fromString(String option) throws NullPointerException, IllegalArgumentException
TimerPreserveMissed
object from a string value.option
- the preserve-missed option as a string, for example as returned
by the toString()
method (case insensitive).TimerPreserveMissed
object corresponding to option
.NullPointerException
- if option
is null
.IllegalArgumentException
- if option
is not a valid
preserve-missed option value.public int toInt()
TimerPreserveMissed
object.TimerPreserveMissed
object.public boolean isNone()
This method is effectively equivalent to the conditional test:
(this == NONE)
, ie. the code:
if (timerPreserveMissed.isNone()) ...
is interchangeable with the code:
if (timerPreserveMissed == TimerPreserveMissed.NONE) ...
true
if this object represents the NONE option,
false
otherwise.public boolean isAll()
This method is effectively equivalent to the conditional test:
(this == ALL)
, ie. the code:
if (timerPreserveMissed.isAll()) ...
is interchangeable with the code:
if (timerPreserveMissed == TimerPreserveMissed.ALL) ...
true
if this object represents the ALL option,
false
otherwise.public boolean isLast()
This method is effectively equivalent to the conditional test:
(this == LAST)
, ie. the code:
if (timerPreserveMissed.isLast()) ...
is interchangeable with the code:
if (timerPreserveMissed == TimerPreserveMissed.LAST) ...
true
if this object represents the LAST option,
false
otherwise.public boolean equals(Object obj)
public int hashCode()