Class JsonStringImpl
java.lang.Object
org.glassfish.json.JsonStringImpl
- All Implemented Interfaces:
JsonString, JsonValue
JsonString impl
-
Nested Class Summary
Nested classes/interfaces inherited from interface JsonValue
JsonValue.ValueType -
Field Summary
FieldsFields inherited from interface JsonValue
EMPTY_JSON_ARRAY, EMPTY_JSON_OBJECT, FALSE, NULL, TRUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares the specified object with thisJsonStringfor equality.getChars()Returns the char sequence for the JSON String valueReturns the JSON string value.Returns the value type of this JSON value.inthashCode()Returns the hash code value for thisJsonStringobject.toString()Returns JSON text for this JSON value.Methods inherited from interface JsonValue
asJsonArray, asJsonObject
-
Field Details
-
value
-
-
Constructor Details
-
JsonStringImpl
JsonStringImpl(String value)
-
-
Method Details
-
getString
Description copied from interface:JsonStringReturns the JSON string value.- Specified by:
getStringin interfaceJsonString- Returns:
- a JSON string value
-
getChars
Description copied from interface:JsonStringReturns the char sequence for the JSON String value- Specified by:
getCharsin interfaceJsonString- Returns:
- a char sequence for the JSON String value
-
getValueType
Description copied from interface:JsonValueReturns the value type of this JSON value.- Specified by:
getValueTypein interfaceJsonValue- Returns:
- JSON value type
-
hashCode
public int hashCode()Description copied from interface:JsonStringReturns the hash code value for thisJsonStringobject. The hash code of aJsonStringobject is defined to be itsJsonString.getString()object's hash code.- Specified by:
hashCodein interfaceJsonString- Overrides:
hashCodein classObject- Returns:
- the hash code value for this
JsonStringobject
-
equals
Description copied from interface:JsonStringCompares the specified object with thisJsonStringfor equality. Returnstrueif and only if the specified object is also aJsonString, and theirJsonString.getString()objects are equal.- Specified by:
equalsin interfaceJsonString- Overrides:
equalsin classObject- Parameters:
obj- the object to be compared for equality with thisJsonString- Returns:
trueif the specified object is equal to thisJsonString
-
toString
-