Package jsonvalues

Class JsNull

  • All Implemented Interfaces:
    JsValue

    public final class JsNull
    extends JsPrimitive
    Represents null, which a valid json value. It's a singleton, only the instance JsNull.NULL exists.
    • Field Detail

      • NULL

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

      • id

        public int id()
      • 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 java.lang.Object
        Returns:
        1
      • equals

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        "null"