org.entityfs.support.lang
Enum TriState
java.lang.Object
java.lang.Enum<TriState>
org.entityfs.support.lang.TriState
- All Implemented Interfaces:
- Serializable, Comparable<TriState>
public enum TriState
- extends Enum<TriState>
The TriState
is an enumeration with three states: NO
, YES
and DONT_CARE
.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- In_jar:
- entityfs-core
Method Summary |
String |
toString()
|
static TriState |
valueOf(boolean b)
Return the tristate value for the boolean (YES or NO ). |
static TriState |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static TriState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
NO
public static final TriState NO
YES
public static final TriState YES
DONT_CARE
public static final TriState DONT_CARE
values
public static TriState[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (TriState c : TriState.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static TriState valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (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 type has no constant
with the specified name
NullPointerException
- if the argument is null
valueOf
public static TriState valueOf(boolean b)
- Return the tristate value for the boolean (
YES
or NO
).
- Parameters:
b
- The boolean
- Returns:
YES
if the boolean is true
, NO
if it is
false
.
toString
public String toString()
- Overrides:
toString
in class Enum<TriState>