org.json

Class JSONObject.Null

private static final class JSONObject.Null extends 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.
Method Summary
protected Objectclone()
There is only intended to be a single instance of the NULL object, so the clone method returns itself.
booleanequals(Object object)
A Null object is equal to the null value and to itself.
StringtoString()
Get the "null" string value.

Method Detail

clone

protected final Object clone()
There is only intended to be a single instance of the NULL object, so the clone method returns itself.

Returns: NULL.

equals

public boolean equals(Object object)
A Null object is equal to the null value and to itself.

Parameters: object An object to test for nullness.

Returns: true if the object parameter is the JSONObject.NULL object or null.

toString

public String toString()
Get the "null" string value.

Returns: The string "null".