Package oracle.nosql.driver.values

## Class StringValue

- java.lang.Object
- - oracle.nosql.driver.values.FieldValue
  - - oracle.nosql.driver.values.StringValue

- All Implemented Interfaces:
    `Comparable<FieldValue>`

      public class StringValue
      extends FieldValue

  A `FieldValue` instance representing a string value.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class oracle.nosql.driver.values.FieldValue

      `FieldValue.Type`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `StringValue​(String value)` | Creates a new instance

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `compareTo​(FieldValue other)` |
    `boolean` | `equals​(Object other)` |
    `boolean` | `getBoolean()` | Returns a boolean value for the field if the value is a boolean or a string.
    `double` | `getDouble()` | Returns a double value for the field if the value can be represented as a valid double without loss of information.
    `int` | `getInt()` | Returns an integer value for the field if the value can be represented as a valid integer without loss of information.
    `long` | `getLong()` | Returns a long value for the field if the value can be represented as a valid long without loss of information.
    `BigDecimal` | `getNumber()` | Returns a BigDecimal value for the field if the value can be represented as a valid BigDecimal without loss of information.
    `FieldValue.Type` | `getType()` | Returns the type of the object
    `String` | `getValue()` | Returns the String value
    `int` | `hashCode()` |
    `String` | `toJson​(JsonOptions options)` | Returns a JSON representation of the value using the options, if specified.

    - ### Methods inherited from class oracle.nosql.driver.values.FieldValue

      `asArray, asBinary, asBoolean, asDouble, asInteger, asJsonNull, asLong, asMap, asNull, asNumber, asString, asTimestamp, castAsDouble, createFromJson, createFromJson, createFromJson, getBinary, getSerializedSize, getString, getTimestamp, isAnyNull, isArray, isAtomic, isBinary, isBoolean, isDouble, isInteger, isJsonNull, isLong, isMap, isNull, isNumber, isNumeric, isString, isTimestamp, toJson, toString`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### StringValue

          public StringValue​(String value)

      Creates a new instance
      Parameters:
        `value` - the value to use

  - ### Method Detail

    - #### getType

          public FieldValue.Type getType()

      Description copied from class: `FieldValue`
      Returns the type of the object
      Specified by:
        `getType` in class `FieldValue`
      Returns:
        the type

    - #### getValue

          public String getValue()

      Returns the String value
      Returns:
        the String value of this object

    - #### getInt

          public int getInt()

      Description copied from class: `FieldValue`
      Returns an integer value for the field if the value can be represented as a valid integer without loss of information. Numbers are coerced using Java rules and strings are parsed according to Java rules.
      Overrides:
        `getInt` in class `FieldValue`
      Returns:
        an integer value

    - #### getDouble

          public double getDouble()

      Description copied from class: `FieldValue`
      Returns a double value for the field if the value can be represented as a valid double without loss of information. Numbers are coerced using Java rules and strings are parsed according to Java rules.
      Overrides:
        `getDouble` in class `FieldValue`
      Returns:
        a double value

    - #### getLong

          public long getLong()

      Description copied from class: `FieldValue`
      Returns a long value for the field if the value can be represented as a valid long without loss of information. Numbers are coerced using Java rules and strings are parsed according to Java rules.
      Overrides:
        `getLong` in class `FieldValue`
      Returns:
        a long value

    - #### getNumber

          public BigDecimal getNumber()

      Description copied from class: `FieldValue`
      Returns a BigDecimal value for the field if the value can be represented as a valid BigDecimal without loss of information. Numbers are coerced using Java rules and strings are parsed according to Java rules.
      Overrides:
        `getNumber` in class `FieldValue`
      Returns:
        a BigDecimal value

    - #### getBoolean

          public boolean getBoolean()

      Description copied from class: `FieldValue`
      Returns a boolean value for the field if the value is a boolean or a string. If it is a StringValue the rules used for Java Boolean.parseBoolean() are applied.
      Overrides:
        `getBoolean` in class `FieldValue`
      Returns:
        the boolean value

    - #### equals

          public boolean equals​(Object other)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### compareTo

          public int compareTo​(FieldValue other)

    - #### toJson

          public String toJson​(JsonOptions options)

      Description copied from class: `FieldValue`
      Returns a JSON representation of the value using the options, if specified.
      Overrides:
        `toJson` in class `FieldValue`
      Parameters:
        `options` - configurable options used to affect the JSON output format of some data types. May be null.
      Returns:
        the JSON representation of this value.