TriState

public enum TriState

Represents a boolean value which can be true, false or refer to a default value.

Entries

FALSE
Link copied to clipboard
FALSE
Represents the boolean value of {@code false}.
DEFAULT
Link copied to clipboard
DEFAULT
Represents a value that refers to a "default" value, often as a fallback.
TRUE
Link copied to clipboard
TRUE
Represents the boolean value of {@code true}.

Functions

describeConstable
Link copied to clipboard
abstract Optional<? extends ConstantDescdescribeConstable()
get
Link copied to clipboard
boolean get()
Gets the value of the tri-state.
getBoxed
Link copied to clipboard
@Nullable()
Boolean getBoxed()
Gets the value of the tri-state as a boxed, nullable boolean.
map
Link copied to clipboard
Optional<Tmap<T>(BooleanFunction<? extends T> mapper)
Maps the boolean value of this tri-state if it is TRUE or FALSE.
of
Link copied to clipboard
static TriState of(boolean bool)
Gets the corresponding tri-state from a boolean value.
static TriState of(@Nullable() Boolean bool)
Gets a tri-state from a nullable boxed boolean.
orElse
Link copied to clipboard
boolean orElse(boolean value)
Gets the value of this tri-state.
orElseGet
Link copied to clipboard
boolean orElseGet(BooleanSupplier supplier)
Gets the value of this tri-state.
orElseThrow
Link copied to clipboard
boolean orElseThrow<X extends Throwable>(Supplier<X> exceptionSupplier)
Gets the value of this tri-state, or throws an exception if this tri-state's value is DEFAULT.
valueOf
Link copied to clipboard
static TriState valueOf(String name)
values
Link copied to clipboard
static Array<TriStatevalues()

Sources

jvm source
Link copied to clipboard