Class JsonStringImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String value  
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonStringImpl​(java.lang.String value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Compares the specified object with this JsonString for equality.
      java.lang.CharSequence getChars()
      Returns the char sequence for the JSON String value
      java.lang.String getString()
      Returns the JSON string value.
      JsonValue.ValueType getValueType()
      Returns the value type of this JSON value.
      int hashCode()
      Returns the hash code value for this JsonString object.
      java.lang.String toString()
      Returns JSON text for this JSON value.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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