public enum AlmostBoolean extends java.lang.Enum<AlmostBoolean>
MAYBE as not initialed.| Modifier and Type | Method and Description |
|---|---|
boolean |
decide(boolean optimistically)
Converts a AlmostBoolean to boolean
|
static AlmostBoolean |
fromBoolean(boolean value)
Converts a boolean to AlmostBoolean
|
boolean |
isMaybe() |
boolean |
isNo() |
boolean |
isYes() |
static AlmostBoolean |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AlmostBoolean[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AlmostBoolean YES
public static final AlmostBoolean NO
public static final AlmostBoolean MAYBE
public static AlmostBoolean[] values()
for (AlmostBoolean c : AlmostBoolean.values()) System.out.println(c);
public static AlmostBoolean valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static AlmostBoolean fromBoolean(boolean value)
public boolean isYes()
public boolean isNo()
public boolean isMaybe()
public boolean decide(boolean optimistically)
optimistically - should MAYBE be true or false