Package org.opencms.json
Class JSONObject.Null
- java.lang.Object
-
- org.opencms.json.JSONObject.Null
-
- Enclosing class:
- JSONObject
protected static final class JSONObject.Null extends java.lang.Object
JSONObject.NULL is equivalent to the value that JavaScript calls null, whilst Java's null is equivalent to the value that JavaScript calls undefined.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Null()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
clone()
There is only intended to be a single instance of the NULL object, so the clone method returns itself.boolean
equals(java.lang.Object object)
A Null object is equal to the null value and to itself.int
hashCode()
java.lang.String
toString()
Get the "null" string value.
-
-
-
Constructor Detail
-
Null
protected Null()
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object object)
A Null object is equal to the null value and to itself.- Overrides:
equals
in classjava.lang.Object
- Parameters:
object
- an object to test for nullness- Returns:
- true if the object parameter is the JSONObject.NULL object or null
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
toString
public java.lang.String toString()
Get the "null" string value.- Overrides:
toString
in classjava.lang.Object
- Returns:
- the string "null".
-
clone
protected java.lang.Object clone()
There is only intended to be a single instance of the NULL object, so the clone method returns itself.- Overrides:
clone
in classjava.lang.Object
- Returns:
- NULL.
-
-