java.lang.Object | ||
↳ | java.lang.Enum<E extends java.lang.Enum<E>> | |
↳ | com.facebook.common.util.TriState |
Generic tri-state enum for boolean values that can also be unset.
Enum Values | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TriState | NO | ||||||||||
TriState | UNSET | ||||||||||
TriState | YES |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
asBoolean(boolean defaultValue)
Returns the
boolean value that corresponds to this TriState , if appropriate. | ||||||||||
boolean |
asBoolean()
Returns the
boolean value that corresponds to this TriState , if appropriate. | ||||||||||
Boolean |
asBooleanObject()
Returns the
Boolean value that corresponds to this TriState , if appropriate. | ||||||||||
static TriState | fromDbValue(int value) | ||||||||||
int | getDbValue() | ||||||||||
boolean | isSet() | ||||||||||
static TriState | valueOf(String name) | ||||||||||
static TriState |
valueOf(boolean bool)
Returns the value of the
TriState enum that corresponds to the specified boolean . | ||||||||||
static TriState | valueOf(Boolean bool) | ||||||||||
final static TriState[] | values() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Enum
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.lang.Comparable
|
Returns the value of the TriState
enum that corresponds to the specified boolean
.
This method deliberately declares boolean
as its param type rather than Boolean because:
boolean
for its
nullability should replace the Boolean with a TriState
, anyway.