Package org.rumbledb.items
Class DayTimeDurationItem
java.lang.Object
org.rumbledb.items.DayTimeDurationItem
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable,Serializable,Item
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests for logical equality.intgetDay()Return only day of the item, if it's DateTime or Duration It will not convert months and years into days.Returns the duration value of the item, if it is a duration.Returns the dynamic type of the item (only for error message purposes).booleanReturns the effective boolean value of the item, if atomic.longReturns the EpochMillis of the item, if it's DateTime or Duration It will collect all the parts of the item and compress it into the EpochMillisintgetHour()Return only hour of the item, if it's DateTime, Time or DurationintReturn only minutes of the item, if it's DateTime, Time or Duration It will not convert hours into minutesintgetMonth()Return only month of the item, if it's DateTime or Duration It will not convert years into monthsintReturn the only nanoseconds of the item, if it's DateTime, Time or Duration It will not convert hours, minutes and seconds into nanoseconds It exists only if the value in seconds will have decimal values, otherwise it will return 0Returns the period value of the item, if it is a duration.doubleReturn only seconds of the item, if it's DateTime, Time or Duration It will not convert hours and minutes into secondsReturns the string value of the item, if it is an atomic item.intgetYear()Return year of the item, if it's DateTime or DurationinthashCode()Computes a hash code.booleanisAtomic()Tests whether the item is an atomic item.booleanTests whether the item is an atomic item of type dayTimeDuration.booleanTests whether the item is an atomic item of type duration.static StringnormalizeDuration(Duration duration) voidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) voidwrite(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, waitMethods inherited from interface org.rumbledb.api.Item
addParentToDescendants, append, atomizedValue, attributes, castToDecimalValue, castToDoubleValue, castToFloatValue, castToIntegerValue, castToIntValue, children, generateNativeQuery, getBinaryValue, getBodyIterator, getBooleanValue, getContent, getDateTimeValue, getDecimalValue, getDFVariablesInClosure, getDoubleValue, getEstimator, getFloatValue, getIdentifier, getIntegerValue, getIntValue, getItemAt, getItemByKey, getItems, getKeys, getLocalVariablesInClosure, getModuleDynamicContext, getMutabilityLevel, getOffset, getParameterNames, getPathIn, getRDDVariablesInClosure, getSignature, getSize, getSparkSQLType, getSparkSQLValue, getSparkSQLValue, getTableLocation, getTextValue, getTimeValue, getTopLevelID, getTopLevelOrder, getTransformer, getValues, getVariantValue, getXmlDocumentPosition, hasDateTime, hasTimeZone, isAnyURI, isArray, isAttributeNode, isBase64Binary, isBinary, isBoolean, isDate, isDateTime, isDecimal, isDocumentNode, isDouble, isElementNode, isEstimator, isFloat, isFunction, isGDay, isGMonth, isGMonthDay, isGYear, isGYearMonth, isHexBinary, isInt, isInteger, isNaN, isNode, isNull, isNumeric, 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
-
DayTimeDurationItem
public DayTimeDurationItem() -
DayTimeDurationItem
-
DayTimeDurationItem
-
-
Method Details
-
isDayTimeDuration
public boolean isDayTimeDuration()Description copied from interface:ItemTests whether the item is an atomic item of type dayTimeDuration.- Specified by:
isDayTimeDurationin interfaceItem- Returns:
- true if it is an atomic item of type dayTimeDuration, false otherwise.
-
isAtomic
public boolean isAtomic()Description copied from interface:ItemTests whether the item is an atomic item. -
isDuration
public boolean isDuration()Description copied from interface:ItemTests whether the item is an atomic item of type duration.- Specified by:
isDurationin interfaceItem- Returns:
- true if it is an atomic item of type duration, false otherwise.
-
getEffectiveBooleanValue
public boolean getEffectiveBooleanValue()Description copied from interface:ItemReturns the effective boolean value of the item, if atomic.- Specified by:
getEffectiveBooleanValuein interfaceItem- Returns:
- the effective boolean value.
-
hashCode
public int hashCode()Description copied from interface:ItemComputes a hash code. -
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
readin interfacecom.esotericsoftware.kryo.KryoSerializable
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
writein interfacecom.esotericsoftware.kryo.KryoSerializable
-
equals
Description copied from interface:ItemTests for logical equality. The semantics are that of the eq operator. -
getDynamicType
Description copied from interface:ItemReturns the dynamic type of the item (only for error message purposes).- Specified by:
getDynamicTypein interfaceItem- Returns:
- the dynamic type as an item type.
-
getStringValue
Description copied from interface:ItemReturns the string value of the item, if it is an atomic item.- Specified by:
getStringValuein interfaceItem- Returns:
- the string value.
-
getEpochMillis
public long getEpochMillis()Description copied from interface:ItemReturns the EpochMillis of the item, if it's DateTime or Duration It will collect all the parts of the item and compress it into the EpochMillis- Specified by:
getEpochMillisin interfaceItem- Returns:
- the EpochMillis
-
getDurationValue
Description copied from interface:ItemReturns the duration value of the item, if it is a duration.- Specified by:
getDurationValuein interfaceItem- Returns:
- the duration value as a Duration.
-
getPeriodValue
Description copied from interface:ItemReturns the period value of the item, if it is a duration.- Specified by:
getPeriodValuein interfaceItem- Returns:
- the period value as a Period.
-
normalizeDuration
-
getMonth
public int getMonth()Description copied from interface:ItemReturn only month of the item, if it's DateTime or Duration It will not convert years into months -
getDay
public int getDay()Description copied from interface:ItemReturn only day of the item, if it's DateTime or Duration It will not convert months and years into days. -
getHour
public int getHour()Description copied from interface:ItemReturn only hour of the item, if it's DateTime, Time or Duration -
getMinute
public int getMinute()Description copied from interface:ItemReturn only minutes of the item, if it's DateTime, Time or Duration It will not convert hours into minutes -
getSecond
public double getSecond()Description copied from interface:ItemReturn only seconds of the item, if it's DateTime, Time or Duration It will not convert hours and minutes into seconds -
getNanosecond
public int getNanosecond()Description copied from interface:ItemReturn the only nanoseconds of the item, if it's DateTime, Time or Duration It will not convert hours, minutes and seconds into nanoseconds It exists only if the value in seconds will have decimal values, otherwise it will return 0- Specified by:
getNanosecondin interfaceItem- Returns:
- only nanoseconds
-
getYear
public int getYear()Description copied from interface:ItemReturn year of the item, if it's DateTime or Duration
-