Enum Class RuntimeTruthiness

java.lang.Object
java.lang.Enum<RuntimeTruthiness>
io.github.protasm.jvmud.compiler.runtime.RuntimeTruthiness
All Implemented Interfaces:
Serializable, Comparable<RuntimeTruthiness>, Constable

public enum RuntimeTruthiness extends Enum<RuntimeTruthiness>
Captures how a runtime value should be interpreted in conditional contexts.
  • Enum Constant Details

    • NUMERIC_ZERO_FALSE

      public static final RuntimeTruthiness NUMERIC_ZERO_FALSE
      Numeric zero is false; non-zero is true.
    • REFERENCE_NULL_FALSE

      public static final RuntimeTruthiness REFERENCE_NULL_FALSE
      null is false; all other references are true.
    • ALWAYS_TRUE

      public static final RuntimeTruthiness ALWAYS_TRUE
      Value is always considered true (used for control constructs, rarely practical).
    • ALWAYS_FALSE

      public static final RuntimeTruthiness ALWAYS_FALSE
      Value is always considered false.
    • NONE

      public static final RuntimeTruthiness NONE
      Truthiness is not applicable (e.g., void).
  • Method Details

    • values

      public static RuntimeTruthiness[] 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

      public static RuntimeTruthiness valueOf(String name)
      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 name
      NullPointerException - if the argument is null