Interface CellValue
- All Superinterfaces:
Comparable<CellValue>
Standard SDK column value type.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionint
The method compares the CellValue object that invoked the method to the argument.Returns the cell value data type.getType()
Returns cell value type.boolean
Determines if the cell value data type is alphanumeric.boolean
Determines if the cell value type is a boolean.boolean
isDate()
Determines if the cell value data type is a date.boolean
Determines if the cell value data type is a decimal.boolean
isEmpty()
Determines if the cell value is empty.boolean
isError()
Determines if the cell value type is an error.boolean
isFalse()
Determines if the cell value is false.boolean
Determines if the cell value is an integer.boolean
isList()
Determines if the cell value type is a list.boolean
isNull()
Determines if cell value is a null.boolean
Determines if the cell value is a number.boolean
isTrue()
Determines if the cell value is true.boolean
Determines if the cell value type is a warning.Returns the BigDecimal object representation of cell value.double
toDouble()
Returns the double value of cell value.int
toInt()
Returns the integer value of cell value.Returns the LocalDate object representation of cell value.Returns the LocalDateTime object representation of cell value.long
toLong()
Returns the long value of cell value.<T> T
toObject()
Converts cell value to an object of type T.Returns the UTC OffsetDateTime object representation of cell value.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getType
CellValueType getType()Returns cell value type.- Returns:
CellValueType
-
getDataType
CellValueDataType getDataType()Returns the cell value data type.- Returns:
CellValueType
-
isNull
boolean isNull()Determines if cell value is a null.- Returns:
true
if the cell value is a null, otherwisefalse
-
isNumeric
boolean isNumeric()Determines if the cell value is a number.- Returns:
true
if the cell value is a number, otherwisefalse
-
isInteger
boolean isInteger()Determines if the cell value is an integer.- Returns:
true
if the cell value is an integer, otherwisefalse
-
isDecimal
boolean isDecimal()Determines if the cell value data type is a decimal.- Returns:
true
if the cell value data type is a decimal, otherwisefalse
-
isAlphanumeric
boolean isAlphanumeric()Determines if the cell value data type is alphanumeric.- Returns:
true
if the cell value data type is alphanumeric, otherwisefalse
-
isDate
boolean isDate()Determines if the cell value data type is a date.- Returns:
true
if the cell value data type is a date, otherwisefalse
-
isList
boolean isList()Determines if the cell value type is a list.- Returns:
true
if the cell value type is a list, otherwisefalse
-
isEmpty
boolean isEmpty()Determines if the cell value is empty.- Returns:
true
if the cell value is empty, otherwisefalse
-
isTrue
boolean isTrue()Determines if the cell value is true.- Returns:
true
if the cell value is true, otherwisefalse
-
isFalse
boolean isFalse()Determines if the cell value is false.- Returns:
true
if the cell value is false, otherwisefalse
-
isBoolean
boolean isBoolean()Determines if the cell value type is a boolean.- Returns:
true
if the cell value type is a boolean, otherwisefalse
-
isError
boolean isError()Determines if the cell value type is an error.- Returns:
true
if the cell value type is an error, otherwisefalse
-
isWarning
boolean isWarning()Determines if the cell value type is a warning.- Returns:
true
if the cell value type is a warning, otherwisefalse
-
toObject
<T> T toObject()Converts cell value to an object of type T.- Type Parameters:
T
- Type of return object- Returns:
- Object of type T
-
toBigDecimal
Optional<BigDecimal> toBigDecimal()Returns the BigDecimal object representation of cell value.- Returns:
- BigDecimal object representation of cell value
-
toLocalDate
Returns the LocalDate object representation of cell value.- Returns:
- LocalDate object representation of cell value
-
toLocalDateTime
Optional<LocalDateTime> toLocalDateTime()Returns the LocalDateTime object representation of cell value.- Returns:
- LocalDateTime object representation of cell value
-
toUtcDateTime
Optional<OffsetDateTime> toUtcDateTime()Returns the UTC OffsetDateTime object representation of cell value.- Returns:
- OffsetDateTime object representation of cell value
-
toLong
long toLong()Returns the long value of cell value.- Returns:
- Long value of cell value
-
toInt
int toInt()Returns the integer value of cell value.- Returns:
- Integer value of cell value
-
toDouble
double toDouble()Returns the double value of cell value.- Returns:
- Double value of cell value
-
compareTo
The method compares the CellValue object that invoked the method to the argument.- Parameters:
other
- Cell value to be compared withignoreCase
- Configures if comparison should ignore case or otherwise- Returns:
- Integer value of 0 if equal, -1 if less than, 1 if greater than
-