Class JsonStringImpl

    • Field Detail

      • value

        private final java.lang.String value
    • Constructor Detail

      • JsonStringImpl

        JsonStringImpl​(java.lang.String value)
    • Method Detail

      • getString

        public java.lang.String getString()
        Description copied from interface: JsonString
        Returns the JSON string value.
        Specified by:
        getString in interface JsonString
        Returns:
        a JSON string value
      • getChars

        public java.lang.CharSequence getChars()
        Description copied from interface: JsonString
        Returns the char sequence for the JSON String value
        Specified by:
        getChars in interface JsonString
        Returns:
        a char sequence for the JSON String value
      • hashCode

        public int hashCode()
        Description copied from interface: JsonString
        Returns the hash code value for this JsonString object. The hash code of a JsonString object is defined to be its JsonString.getString() object's hash code.
        Specified by:
        hashCode in interface JsonString
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hash code value for this JsonString object
      • equals

        public boolean equals​(java.lang.Object obj)
        Description copied from interface: JsonString
        Compares the specified object with this JsonString for equality. Returns true if and only if the specified object is also a JsonString, and their JsonString.getString() objects are equal.
        Specified by:
        equals in interface JsonString
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object to be compared for equality with this JsonString
        Returns:
        true if the specified object is equal to this JsonString
      • toString

        public java.lang.String toString()
        Description copied from interface: JsonValue
        Returns JSON text for this JSON value.
        Specified by:
        toString in interface JsonValue
        Overrides:
        toString in class java.lang.Object
        Returns:
        JSON text