Package javax.json
Class JsonValueImpl
java.lang.Object
javax.json.JsonValueImpl
- All Implemented Interfaces:
Serializable,JsonValue
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 javax.json.JsonValue
JsonValue.ValueType -
Field Summary
FieldsFields inherited from interface javax.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, waitMethods inherited from interface javax.json.JsonValue
asJsonArray, asJsonObject
-
Field Details
-
valueType
-
-
Constructor Details
-
JsonValueImpl
JsonValueImpl(JsonValue.ValueType valueType)
-
-
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
public int hashCode()Returns the hash code value for thisJsonValueobject. The hash code of theJsonValueobject is defined to be itsgetValueType()object's hash code. -
toString
Description copied from interface:JsonValueReturns JSON text for this JSON value.
-