java.lang.Object
jakarta.json.JsonValueImpl
- All Implemented Interfaces:
JsonValue
,Serializable
Private implementation of
JsonValue
for simple JsonValue.ValueType
s
allowing their usage in constants which are better to implement Serializable
.-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.json.JsonValue
JsonValue.ValueType
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
for serializationprivate final JsonValue.ValueType
Type of this JsonValue.Fields inherited from interface jakarta.json.JsonValue
EMPTY_JSON_ARRAY, EMPTY_JSON_OBJECT, FALSE, NULL, TRUE
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface jakarta.json.JsonValue
asJsonArray, asJsonObject
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDfor serialization- See Also:
-
valueType
Type of this JsonValue.
-
-
Constructor Details
-
JsonValueImpl
JsonValueImpl(JsonValue.ValueType valueType) Default constructor.- Parameters:
valueType
- Type of this JsonValue
-
-
Method Details
-
getValueType
Returns the value type of this JSON value.- Specified by:
getValueType
in interfaceJsonValue
- Returns:
- JSON value type
-
equals
Compares the specified object with thisJsonValue
object for equality. Returnstrue
if and only if the specified object is also a JsonValue, and theirgetValueType()
objects are equal. -
hashCode
public int hashCode()Returns the hash code value for thisJsonValue
object. The hash code of theJsonValue
object is defined to be itsgetValueType()
object's hash code. -
toString
Description copied from interface:JsonValue
Returns JSON text for this JSON value.
-