Enum Class RuntimeTruthiness
- All Implemented Interfaces:
Serializable, Comparable<RuntimeTruthiness>, Constable
Captures how a runtime value should be interpreted in conditional contexts.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionValue is always considered false.Value is always considered true (used for control constructs, rarely practical).Truthiness is not applicable (e.g.,void).Numeric zero is false; non-zero is true.nullis false; all other references are true. -
Method Summary
Modifier and TypeMethodDescriptionstatic RuntimeTruthinessReturns the enum constant of this class with the specified name.static RuntimeTruthiness[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NUMERIC_ZERO_FALSE
Numeric zero is false; non-zero is true. -
REFERENCE_NULL_FALSE
nullis false; all other references are true. -
ALWAYS_TRUE
Value is always considered true (used for control constructs, rarely practical). -
ALWAYS_FALSE
Value is always considered false. -
NONE
Truthiness is not applicable (e.g.,void).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-