Package org.glassfish.json
Class JsonStringImpl
- java.lang.Object
-
- org.glassfish.json.JsonStringImpl
-
- All Implemented Interfaces:
JsonString,JsonValue
final class JsonStringImpl extends java.lang.Object implements JsonString
JsonString impl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface javax.json.JsonValue
JsonValue.ValueType
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringvalue-
Fields inherited from interface javax.json.JsonValue
EMPTY_JSON_ARRAY, EMPTY_JSON_OBJECT, FALSE, NULL, TRUE
-
-
Constructor Summary
Constructors Constructor Description JsonStringImpl(java.lang.String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Compares the specified object with thisJsonStringfor equality.java.lang.CharSequencegetChars()Returns the char sequence for the JSON String valuejava.lang.StringgetString()Returns the JSON string value.JsonValue.ValueTypegetValueType()Returns the value type of this JSON value.inthashCode()Returns the hash code value for thisJsonStringobject.java.lang.StringtoString()Returns JSON text for this JSON value.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.json.JsonValue
asJsonArray, asJsonObject
-
-
-
-
Method Detail
-
getString
public java.lang.String getString()
Description copied from interface:JsonStringReturns the JSON string value.- Specified by:
getStringin interfaceJsonString- Returns:
- a JSON string value
-
getChars
public java.lang.CharSequence 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
public JsonValue.ValueType 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 classjava.lang.Object- Returns:
- the hash code value for this
JsonStringobject
-
equals
public boolean equals(java.lang.Object obj)
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 classjava.lang.Object- Parameters:
obj- the object to be compared for equality with thisJsonString- Returns:
trueif the specified object is equal to thisJsonString
-
-