public enum OptionalBoolean extends Enum<OptionalBoolean>
OptionalBoolean
like below:
{"has_email": true} = TRUE
{"has_email": false} = FALSE
{} = NONE
Enum Constant and Description |
---|
FALSE
Represents false
|
NONE
Represents no value
|
TRUE
Represents true
|
Modifier and Type | Method and Description |
---|---|
Boolean |
getBoolean() |
static OptionalBoolean |
getOptionalBoolean(Boolean bool) |
static OptionalBoolean |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OptionalBoolean[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OptionalBoolean FALSE
public static final OptionalBoolean NONE
public static final OptionalBoolean TRUE
public Boolean getBoolean()
public static OptionalBoolean getOptionalBoolean(Boolean bool)
public static OptionalBoolean valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static OptionalBoolean[] values()
for (OptionalBoolean c : OptionalBoolean.values()) System.out.println(c);