Class JsonValueImpl
java.lang.Object
jakarta.json.JsonValueImpl
- All Implemented Interfaces:
JsonValue, Serializable
Private implementation of
JsonValue for simple JsonValue.ValueTypes
allowing their usage in constants which are better to implement Serializable.-
Nested Class Summary
Nested classes/interfaces inherited from interface JsonValue
JsonValue.ValueType -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longfor serializationprivate final JsonValue.ValueTypeType of this JsonValue.Fields inherited from interface JsonValue
EMPTY_JSON_ARRAY, EMPTY_JSON_OBJECT, FALSE, NULL, TRUE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from interface 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:
getValueTypein interfaceJsonValue- Returns:
- JSON value type
-
equals
Compares the specified object with thisJsonValueobject for equality. Returnstrueif and only if the specified object is also a JsonValue, and theirgetValueType()objects are equal. -
hashCode
-
toString
-