Package org.glassfish.json
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 javax.json.JsonValue
JsonValue.ValueType
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the specified object with thisJsonString
for equality.getChars()
Returns the char sequence for the JSON String valueReturns the JSON string value.Returns the value type of this JSON value.int
hashCode()
Returns the hash code value for thisJsonString
object.toString()
Returns JSON text for this JSON value.
-
Field Details
-
value
-
-
Constructor Details
-
JsonStringImpl
JsonStringImpl(String value)
-
-
Method Details
-
getString
Description copied from interface:JsonString
Returns the JSON string value.- Specified by:
getString
in interfaceJsonString
- Returns:
- a JSON string value
-
getChars
Description copied from interface:JsonString
Returns the char sequence for the JSON String value- Specified by:
getChars
in interfaceJsonString
- Returns:
- a char sequence for the JSON String value
-
getValueType
Description copied from interface:JsonValue
Returns the value type of this JSON value.- Specified by:
getValueType
in interfaceJsonValue
- Returns:
- JSON value type
-
hashCode
public int hashCode()Description copied from interface:JsonString
Returns the hash code value for thisJsonString
object. The hash code of aJsonString
object is defined to be itsJsonString.getString()
object's hash code.- Specified by:
hashCode
in interfaceJsonString
- Overrides:
hashCode
in classObject
- Returns:
- the hash code value for this
JsonString
object
-
equals
Description copied from interface:JsonString
Compares the specified object with thisJsonString
for equality. Returnstrue
if and only if the specified object is also aJsonString
, and theirJsonString.getString()
objects are equal.- Specified by:
equals
in interfaceJsonString
- Overrides:
equals
in classObject
- Parameters:
obj
- the object to be compared for equality with thisJsonString
- Returns:
true
if the specified object is equal to thisJsonString
-
toString
Description copied from interface:JsonValue
Returns JSON text for this JSON value.
-