Class DateTimeStampItem

java.lang.Object
org.rumbledb.items.AbstractAtomicItem
org.rumbledb.items.DateTimeStampItem
All Implemented Interfaces:
Serializable, Item

public class DateTimeStampItem extends AbstractAtomicItem
See Also:
  • Method Details

    • copy

      public Item copy(boolean mutable)
      Description copied from interface: Item
      Makes a copy.
      Parameters:
      mutable - whether the copy should be mutable (if supported by the item).
      Returns:
      a copy
    • getDateTimeValue

      public OffsetDateTime getDateTimeValue()
      Description copied from interface: Item
      Returns the dateTime value of the item, if it is an atomic item of type dateTimeItem or dateItem or timeItem.
      Returns:
      the dateTime value as a OffsetDateTime.
    • getStringValue

      public String getStringValue()
      Description copied from interface: Item
      Returns the string value of the item, if it is an atomic item.
      Returns:
      the string value.
    • isDateTime

      public boolean isDateTime()
      Description copied from interface: Item
      Tests whether the item is an atomic item of type dateTime.
      Returns:
      true if it is an atomic item of type dateTime, false otherwise.
    • hasDateTime

      public boolean hasDateTime()
      Description copied from interface: Item
      Tests whether the item contains a representation of date or time (or both).
      Returns:
      true if it is an atomic item of type time, date or dateTime, false otherwise.
    • hasTimeZone

      public boolean hasTimeZone()
      Returns:
      true if the Item has a timeZone, false otherwise
    • getEffectiveBooleanValue

      public boolean getEffectiveBooleanValue()
      Description copied from interface: Item
      Returns the effective boolean value of the item, if atomic.
      Returns:
      the effective boolean value.
    • getDynamicType

      public ItemType getDynamicType()
      Description copied from interface: Item
      Returns the dynamic type of the item (only for error message purposes).
      Returns:
      the dynamic type as an item type.
    • isAtomic

      public boolean isAtomic()
      Description copied from interface: Item
      Tests whether the item is an atomic item.
      Returns:
      true if it is an atomic item, false otherwise.
    • getMonth

      public int getMonth()
      Description copied from interface: Item
      Return only month of the item, if it's DateTime or Duration It will not convert years into months
      Returns:
      only month
    • getYear

      public int getYear()
      Description copied from interface: Item
      Return year of the item, if it's DateTime or Duration
      Returns:
      year
    • getDay

      public int getDay()
      Description copied from interface: Item
      Return only day of the item, if it's DateTime or Duration It will not convert months and years into days.
      Returns:
      only day
    • getHour

      public int getHour()
      Description copied from interface: Item
      Return only hour of the item, if it's DateTime, Time or Duration
      Returns:
      only hour
    • getMinute

      public int getMinute()
      Description copied from interface: Item
      Return only minutes of the item, if it's DateTime, Time or Duration It will not convert hours into minutes
      Returns:
      only minute
    • getSecond

      public double getSecond()
      Description copied from interface: Item
      Return only seconds of the item, if it's DateTime, Time or Duration It will not convert hours and minutes into seconds
      Returns:
      only seconds
    • getNanosecond

      public int getNanosecond()
      Description copied from interface: Item
      Return 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
      Returns:
      only nanoseconds
    • getOffset

      public int getOffset()
      Description copied from interface: Item
      Offset is an integer between −840 and 840 inclusive
      Returns:
      offset in minutes
    • getEpochMillis

      public long getEpochMillis()
      Description copied from interface: Item
      Returns 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
      Returns:
      the EpochMillis
    • getVariantValue

      public Object 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.
      Returns:
      Object representing the converted value of the item.