Package jsonvalues

Class JsNull

All Implemented Interfaces:
JsValue

public final class JsNull extends JsPrimitive
Represents null. It's a singleton, only the instance NULL exists.
  • Field Details

    • NULL

      public static final JsNull NULL
      The singleton null value.
  • Method Details

    • toJsPrimitive

      public JsPrimitive toJsPrimitive()
      Description copied from interface: JsValue
      Returns this JsValue as a JsPrimitive.
      Returns:
      This JsValue as a JsPrimitive.
    • isNull

      public boolean isNull()
      Description copied from interface: JsValue
      Returns true if this element is null.
      Returns:
      True if this element is null.
    • hashCode

      public int hashCode()
      Returns the hashcode of this JSON null
      Overrides:
      hashCode in class Object
      Returns:
      1
    • equals

      public boolean equals(Object that)
      Returns true if that is the singleton NULL.
      Overrides:
      equals in class Object
      Parameters:
      that - the reference object with which to compare.
      Returns:
      true if that is NULL
    • toString

      public String toString()
      Overrides:
      toString in class Object