Package org.rumbledb.items
Class IntItem
java.lang.Object
org.rumbledb.items.IntItem
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
,Serializable
,Item
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCasts the item to a decimal value (must be a numeric).double
Casts the item to a double value (must be a numeric).float
Casts the item to a float value (must be a numeric).Casts the item to a big integer value (must be a numeric).int
Casts the item to an integer value (must be a numeric).boolean
Tests for logical equality.generateNativeQuery
(NativeClauseContext context) Get sparkSql string for the itemReturns the decimal value of the item, if it is a decimal.Returns the dynamic type of the item (only for error message purposes).boolean
Returns the effective boolean value of the item, if atomic.Returns the integer value of the item as a bit integer, if it is an integer.int
Returns the int value of the item, if it is an int.Returns the SparkSQL type of the item for use in a query.Returns the SparkSQL value of the item for use in a query.getSparkSQLValue
(ItemType itemType) Returns the SparkSQL value of the item for use in a query.Returns the string value of the item, if it is an atomic item.Returns the Object containing the converted value of the item for a DataFrame.int
hashCode()
Computes a hash code.boolean
isAtomic()
Tests whether the item is an atomic item.boolean
Tests whether the item is an atomic item of type decimal.boolean
isDouble()
Tests whether the item is an atomic item of type double.boolean
isInt()
Tests whether the item is an atomic item of type int.boolean
Tests whether the item is an atomic item of type integer.boolean
Tests whether the item is a number (decimal or double).void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) void
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.rumbledb.api.Item
addParentToDescendants, append, atomizedValue, attributes, children, getBinaryValue, getBodyIterator, getBooleanValue, getContent, getDateTimeValue, getDay, getDFVariablesInClosure, getDoubleValue, getDurationValue, getEpochMillis, getEstimator, getFloatValue, getHour, getIdentifier, getItemAt, getItemByKey, getItems, getKeys, getLocalVariablesInClosure, getMinute, getModuleDynamicContext, getMonth, getMutabilityLevel, getNanosecond, getOffset, getParameterNames, getPathIn, getPeriodValue, getRDDVariablesInClosure, getSecond, getSignature, getSize, getTableLocation, getTextValue, getTimeValue, getTopLevelID, getTopLevelOrder, getTransformer, getValues, getXmlDocumentPosition, getYear, hasDateTime, hasTimeZone, isAnyURI, isArray, isAttributeNode, isBase64Binary, isBinary, isBoolean, isDate, isDateTime, isDayTimeDuration, isDocumentNode, isDuration, isElementNode, isEstimator, isFloat, isFunction, isGDay, isGMonth, isGMonthDay, isGYear, isGYearMonth, isHexBinary, isNaN, isNode, isNull, isObject, isPeriod, isString, isTextNode, isTime, isTransformer, isYearMonthDuration, nodeName, parent, physicalEquals, putItem, putItemAt, putItemByKey, putItemsAt, putLazyItemByKey, removeItemAt, removeItemByKey, serialize, serializeAsJSON, setMutabilityLevel, setParent, setPathIn, setTableLocation, setTopLevelID, setTopLevelOrder, setXmlDocumentPosition
-
Constructor Details
-
IntItem
public IntItem() -
IntItem
public IntItem(int value)
-
-
Method Details
-
equals
Description copied from interface:Item
Tests for logical equality. The semantics are that of the eq operator. -
getIntValue
public int getIntValue()Description copied from interface:Item
Returns the int value of the item, if it is an int.- Specified by:
getIntValue
in interfaceItem
- Returns:
- the integer value as an int.
-
getVariantValue
Description copied from interface:Item
Returns the Object containing the converted value of the item for a DataFrame. For use to build Variant columns.- Specified by:
getVariantValue
in interfaceItem
- Returns:
- Object representing the converted value of the item.
-
getIntegerValue
Description copied from interface:Item
Returns the integer value of the item as a bit integer, if it is an integer.- Specified by:
getIntegerValue
in interfaceItem
- Returns:
- the integer value as a BigInteger.
-
getDecimalValue
Description copied from interface:Item
Returns the decimal value of the item, if it is a decimal.- Specified by:
getDecimalValue
in interfaceItem
- Returns:
- the decimal value as a BigDecimal.
-
getEffectiveBooleanValue
public boolean getEffectiveBooleanValue()Description copied from interface:Item
Returns the effective boolean value of the item, if atomic.- Specified by:
getEffectiveBooleanValue
in interfaceItem
- Returns:
- the effective boolean value.
-
getStringValue
Description copied from interface:Item
Returns the string value of the item, if it is an atomic item.- Specified by:
getStringValue
in interfaceItem
- Returns:
- the string value.
-
castToDoubleValue
public double castToDoubleValue()Description copied from interface:Item
Casts the item to a double value (must be a numeric).- Specified by:
castToDoubleValue
in interfaceItem
- Returns:
- the double value.
-
castToFloatValue
public float castToFloatValue()Description copied from interface:Item
Casts the item to a float value (must be a numeric).- Specified by:
castToFloatValue
in interfaceItem
- Returns:
- the float value.
-
castToDecimalValue
Description copied from interface:Item
Casts the item to a decimal value (must be a numeric).- Specified by:
castToDecimalValue
in interfaceItem
- Returns:
- the BigDecimal value.
-
castToIntegerValue
Description copied from interface:Item
Casts the item to a big integer value (must be a numeric).- Specified by:
castToIntegerValue
in interfaceItem
- Returns:
- the BigInteger value.
-
castToIntValue
public int castToIntValue()Description copied from interface:Item
Casts the item to an integer value (must be a numeric).- Specified by:
castToIntValue
in interfaceItem
- Returns:
- the int value.
-
isInteger
public boolean isInteger()Description copied from interface:Item
Tests whether the item is an atomic item of type integer. -
isDecimal
public boolean isDecimal()Description copied from interface:Item
Tests whether the item is an atomic item of type decimal. -
isInt
public boolean isInt()Description copied from interface:Item
Tests whether the item is an atomic item of type int. -
isDouble
public boolean isDouble()Description copied from interface:Item
Tests whether the item is an atomic item of type double. -
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
hashCode
public int hashCode()Description copied from interface:Item
Computes a hash code. -
getDynamicType
Description copied from interface:Item
Returns the dynamic type of the item (only for error message purposes).- Specified by:
getDynamicType
in interfaceItem
- Returns:
- the dynamic type as an item type.
-
generateNativeQuery
Description copied from interface:Item
Get sparkSql string for the item- Specified by:
generateNativeQuery
in interfaceItem
- Parameters:
context
- input context- Returns:
- String representing the item in a sparksql query or null if it is not supported for the item
-
isNumeric
public boolean isNumeric()Description copied from interface:Item
Tests whether the item is a number (decimal or double). -
isAtomic
public boolean isAtomic()Description copied from interface:Item
Tests whether the item is an atomic item. -
getSparkSQLValue
Description copied from interface:Item
Returns the SparkSQL value of the item for use in a query.- Specified by:
getSparkSQLValue
in interfaceItem
- Returns:
- String representing the SparkSQL value of the item.
-
getSparkSQLValue
Description copied from interface:Item
Returns the SparkSQL value of the item for use in a query.- Specified by:
getSparkSQLValue
in interfaceItem
- Returns:
- String representing the SparkSQL value of the item.
-
getSparkSQLType
Description copied from interface:Item
Returns the SparkSQL type of the item for use in a query.- Specified by:
getSparkSQLType
in interfaceItem
- Returns:
- String representing the SparkSQL type of the item.
-