Package javax.json
Interface JsonString
-
- All Superinterfaces:
JsonValue
public interface JsonString extends JsonValue
An immutable JSON string value.
This is a near-exact copy of the same-titled Java EE 8 Class:javax.json.JsonString
Commenting has been slightly modified to accompany HiLiting the Code Examples.
Java Source Code remains identical to the Sun-Oracle & 'GlassFish' Released Distributions.
Read included License:HERE
, and theCDDL+GPL-1.1
Alljavax.json.*
Code Obtained From:GitHub JavaEE jsonp
Public Archive.
Hi-Lited Source-Code:This File's Source Code:
- View Here: javax/json/JsonString.java
- Open New Browser-Tab: javax/json/JsonString.java
File Size: 3,271 Bytes Line Count: 89 '\n' Characters Found
Glass Fish Implementation Class:
- View Here: org/glassfish/json/JsonStringImpl.java
- Open New Browser-Tab: org/glassfish/json/JsonStringImpl.java
File Size: 4,300 Bytes Line Count: 132 '\n' Characters Found
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface javax.json.JsonValue
JsonValue.ValueType
-
-
Field Summary
-
Fields inherited from interface javax.json.JsonValue
EMPTY_JSON_ARRAY, EMPTY_JSON_OBJECT, FALSE, NULL, TRUE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
equals(Object obj)
Compares the specified object with thisJsonString
for equality.CharSequence
getChars()
Returns the char sequence for the JSON String valueString
getString()
Returns the JSON string value.int
hashCode()
Returns the hash code value for thisJsonString
object.-
Methods inherited from interface javax.json.JsonValue
asJsonArray, asJsonObject, getValueType, toString
-
-
-
-
Method Detail
-
getString
java.lang.String getString()
Returns the JSON string value.- Returns:
- a JSON string value
-
getChars
java.lang.CharSequence getChars()
Returns the char sequence for the JSON String value- Returns:
- a char sequence for the JSON String value
-
equals
boolean equals(java.lang.Object obj)
Compares the specified object with thisJsonString
for equality. Returnstrue
if and only if the specified object is also aJsonString
, and theirgetString()
objects are equal.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the object to be compared for equality with thisJsonString
- Returns:
true
if the specified object is equal to thisJsonString
-
hashCode
int hashCode()
Returns the hash code value for thisJsonString
object. The hash code of aJsonString
object is defined to be itsgetString()
object's hash code.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- the hash code value for this
JsonString
object
-
-