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
AFieldValue
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)
FieldValue.Type
getType()
Returns the type of the objectString
getValue()
Returns the String valueint
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, getBoolean, getDouble, getInt, getLong, getNumber, getSerializedSize, getString, getTimestamp, isAtomic, isJsonNull, isNull, isNumeric, toJson, toString
-
-
-
-
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 classFieldValue
- Returns:
- the type
-
getValue
public String getValue()
Returns the String value- Returns:
- the String value of this 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 classFieldValue
- 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.
-
-