Package oracle.nosql.driver.values
Class IntegerValue
java.lang.Object
oracle.nosql.driver.values.FieldValue
oracle.nosql.driver.values.IntegerValue
- All Implemented Interfaces:
- Comparable<FieldValue>
A 
FieldValue instance representing an integer value.- 
Nested Class SummaryNested classes/interfaces inherited from class oracle.nosql.driver.values.FieldValueFieldValue.Type
- 
Constructor SummaryConstructorsConstructorDescriptionIntegerValue(int value) Creates a new instance.IntegerValue(String value) Creates a new instance from a String value
- 
Method SummaryModifier and TypeMethodDescriptiondoubleCasts this integer to a double, possibly with loss of information about magnitude, precision or sign.intcompareTo(FieldValue other) booleandoubleReturns a Double value for this object.longgetLong()Returns a long value for this object.Returns a BigDecimal value for this object.Returns a String value for the field.getType()Returns the type of the objectintgetValue()Returns the integer value of this objectinthashCode()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, createFromJson, createFromJson, createFromJson, getBinary, getBoolean, getInt, getSerializedSize, getTimestamp, isAnyNull, isArray, isAtomic, isBinary, isBoolean, isDouble, isInteger, isJsonNull, isLong, isMap, isNull, isNumber, isNumeric, isString, isTimestamp, toJson, toString
- 
Constructor Details- 
IntegerValuepublic IntegerValue(int value) Creates a new instance.- Parameters:
- value- the value to use
 
- 
IntegerValueCreates a new instance from a String value- Parameters:
- value- the value to use
- Throws:
- NumberFormatException- if the value is not a valid integer
 
 
- 
- 
Method Details- 
getTypeDescription copied from class:FieldValueReturns the type of the object- Specified by:
- getTypein class- FieldValue
- Returns:
- the type
 
- 
getValuepublic int getValue()Returns the integer value of this object- Returns:
- the integer value
 
- 
compareTo
- 
getLongpublic long getLong()Returns a long value for this object.- Overrides:
- getLongin class- FieldValue
- Returns:
- the long value
 
- 
castAsDoublepublic double castAsDouble()Casts this integer to a double, possibly with loss of information about magnitude, precision or sign.- Overrides:
- castAsDoublein class- FieldValue
- Returns:
- a double value
 
- 
getDoublepublic double getDouble()Returns a Double value for this object.- Overrides:
- getDoublein class- FieldValue
- Returns:
- the double value
 
- 
getNumberReturns a BigDecimal value for this object.- Overrides:
- getNumberin class- FieldValue
- Returns:
- the BigDecimal value
 
- 
getStringDescription copied from class:FieldValueReturns a String value for the field. The String value cannot be created for MapValue, ArrayValue and BinaryValue. String values that are coerced use Java rules for representation.- Overrides:
- getStringin class- FieldValue
- Returns:
- a String value
 
- 
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.
 
- 
equals
- 
hashCodepublic int hashCode()
 
-