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>
A 
FieldValue instance representing a string value.- 
Nested Class SummaryNested classes/interfaces inherited from class oracle.nosql.driver.values.FieldValueFieldValue.Type
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintcompareTo(FieldValue other) booleanbooleanReturns a boolean value for the field if the value is a boolean or a string.doubleReturns a double value for the field if the value can be represented as a valid double without loss of information.intgetInt()Returns an integer value for the field if the value can be represented as a valid integer without loss of information.longgetLong()Returns a long value for the field if the value can be represented as a valid long without loss of information.Returns a BigDecimal value for the field if the value can be represented as a valid BigDecimal without loss of information.getType()Returns the type of the objectgetValue()Returns the String valueinthashCode()toJson(JsonOptions options) Returns a JSON representation of the value using the options, if specified.Methods inherited from class oracle.nosql.driver.values.FieldValueasArray, 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
- 
Constructor Details- 
StringValueCreates a new instance- Parameters:
- value- the value to use
 
 
- 
- 
Method Details- 
getTypeDescription copied from class:FieldValueReturns the type of the object- Specified by:
- getTypein class- FieldValue
- Returns:
- the type
 
- 
getValueReturns the String value- Returns:
- the String value of this object
 
- 
getIntpublic int getInt()Description copied from class:FieldValueReturns 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:
- getIntin class- FieldValue
- Returns:
- an integer value
 
- 
getDoublepublic double getDouble()Description copied from class:FieldValueReturns 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:
- getDoublein class- FieldValue
- Returns:
- a double value
 
- 
getLongpublic long getLong()Description copied from class:FieldValueReturns 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:
- getLongin class- FieldValue
- Returns:
- a long value
 
- 
getNumberDescription copied from class:FieldValueReturns 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:
- getNumberin class- FieldValue
- Returns:
- a BigDecimal value
 
- 
getBooleanpublic boolean getBoolean()Description copied from class:FieldValueReturns 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:
- getBooleanin class- FieldValue
- Returns:
- the boolean value
 
- 
equals
- 
hashCodepublic int hashCode()
- 
compareTo
- 
toJsonDescription copied from class:FieldValueReturns a JSON representation of the value using the options, if specified.- Overrides:
- toJsonin 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.
 
 
-