Package javax.json
Class JsonValueImpl
java.lang.Object
javax.json.JsonValueImpl
- All Implemented Interfaces:
Serializable
,JsonValue
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 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, wait
Methods 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:
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.
-