Package com.google.gson
Class JsonNull
- java.lang.Object
-
- com.google.gson.JsonElement
-
- com.google.gson.JsonNull
-
public final class JsonNull extends JsonElement
A class representing a Jsonnullvalue.- Since:
- 1.2
-
-
Constructor Summary
Constructors Constructor Description JsonNull()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonNulldeepCopy()Returns the same instance since it is an immutable valuebooleanequals(java.lang.Object other)All instances of JsonNull are the sameinthashCode()All instances of JsonNull have the same hash code since they are indistinguishable-
Methods inherited from class com.google.gson.JsonElement
getAsBigDecimal, getAsBigInteger, getAsBoolean, getAsByte, getAsCharacter, getAsDouble, getAsFloat, getAsInt, getAsJsonArray, getAsJsonNull, getAsJsonObject, getAsJsonPrimitive, getAsLong, getAsNumber, getAsShort, getAsString, isJsonArray, isJsonNull, isJsonObject, isJsonPrimitive, toString
-
-
-
-
Field Detail
-
INSTANCE
public static final JsonNull INSTANCE
singleton for JsonNull- Since:
- 1.8
-
-
Constructor Detail
-
JsonNull
@Deprecated public JsonNull()
Deprecated.Creates a new JsonNull object. Deprecated since Gson version 1.8. UseINSTANCEinstead
-
-
Method Detail
-
deepCopy
public JsonNull deepCopy()
Returns the same instance since it is an immutable value- Specified by:
deepCopyin classJsonElement- Since:
- 2.8.2
-
hashCode
public int hashCode()
All instances of JsonNull have the same hash code since they are indistinguishable- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
All instances of JsonNull are the same- Overrides:
equalsin classjava.lang.Object
-
-