Enum Class NullValue

java.lang.Object
java.lang.Enum<NullValue>
com.darkcollective.relix.value.NullValue
All Implemented Interfaces:
Value, Serializable, Comparable<NullValue>, Constable

public enum NullValue extends Enum<NullValue> implements Value
The absent (SQL NULL) value, compatible with all scalar types.

Use the singleton INSTANCE rather than constructing a new instance.

  • Enum Constant Details

    • INSTANCE

      public static final NullValue INSTANCE
      The sole null value.
  • Method Details

    • values

      public static NullValue[] 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 NullValue 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
    • isNull

      public boolean isNull()
      Description copied from interface: Value
      Returns true if this value is null (absent).
      Specified by:
      isNull in interface Value
      Returns:
      whether this is a NullValue
    • type

      public ScalarType type()
      Description copied from interface: Value
      Returns the ScalarType that describes this value's kind. NullValue returns ScalarType.ANY.
      Specified by:
      type in interface Value
      Returns:
      the scalar type
    • asDisplayString

      public String asDisplayString()
      Description copied from interface: Value
      Returns a human-readable display string for this value, suitable for output formatting. NullValue returns "NULL".
      Specified by:
      asDisplayString in interface Value
      Returns:
      display string; never null