public enum Tristate extends Enum<Tristate>
Modifier and Type | Method and Description |
---|---|
static Tristate |
from(Optional<Boolean> b)
Build a tristate from a boolean.
|
static Tristate |
fromBool(boolean v) |
Optional<Boolean> |
getMapping()
Get the boolean mapping, if present.
|
boolean |
isBoolean()
Does this value map to a boolean.
|
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.
|
public static final Tristate TRUE
public static final Tristate FALSE
public static final Tristate UNKNOWN
public static Tristate[] values()
for (Tristate c : Tristate.values()) System.out.println(c);
public static Tristate 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 Optional<Boolean> getMapping()
public boolean isBoolean()
public static Tristate fromBool(boolean v)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.