Class ArrayItem

java.lang.Object
org.rumbledb.items.ArrayItem
All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable, Serializable, Item

public class ArrayItem extends Object implements Item
See Also:
  • Constructor Details

    • ArrayItem

      public ArrayItem()
    • ArrayItem

      public ArrayItem(List<Item> arrayItems)
  • Method Details

    • equals

      public boolean equals(Object otherItem)
      Description copied from interface: Item
      Tests for logical equality. The semantics are that of the eq operator.
      Specified by:
      equals in interface Item
      Overrides:
      equals in class Object
      Parameters:
      otherItem - another item.
      Returns:
      true it is equal to other, false otherwise.
    • append

      public void append(Item other)
      Description copied from interface: Item
      Adds a value pair, if it is an array item.
      Specified by:
      append in interface Item
      Parameters:
      other - a value.
    • getItems

      public List<Item> getItems()
      Description copied from interface: Item
      Returns the members of the item if it is an array.
      Specified by:
      getItems in interface Item
      Returns:
      the list of the array members.
    • getItemAt

      public Item getItemAt(int i)
      Description copied from interface: Item
      Returns the member of the item at the specified position if it is an array.
      Specified by:
      getItemAt in interface Item
      Parameters:
      i - a position.
      Returns:
      the member at position position.
    • putItem

      public void putItem(Item value)
      Description copied from interface: Item
      Appends an item, if it is an array.
      Specified by:
      putItem in interface Item
      Parameters:
      value - an item.
    • putItemAt

      public void putItemAt(Item value, int i)
      Description copied from interface: Item
      Add an item at index i, if it is an array.
      Specified by:
      putItemAt in interface Item
      Parameters:
      value - an item.
      i - an integer.
    • putItemsAt

      public void putItemsAt(List<Item> values, int i)
      Description copied from interface: Item
      Add all items in items at index i, if it is an array.
      Specified by:
      putItemsAt in interface Item
      Parameters:
      values - a list of items.
      i - an integer.
    • removeItemAt

      public void removeItemAt(int i)
      Description copied from interface: Item
      Remove the item at index i, if it is an array.
      Specified by:
      removeItemAt in interface Item
      Parameters:
      i - an integer.
    • isArray

      public boolean isArray()
      Description copied from interface: Item
      Tests whether the item is an array.
      Specified by:
      isArray in interface Item
      Returns:
      true if it is an array, false otherwise.
    • getSize

      public int getSize()
      Description copied from interface: Item
      Returns the size of the item, if it is an array.
      Specified by:
      getSize in interface Item
      Returns:
      the size as an int.
    • write

      public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
      Specified by:
      write in interface com.esotericsoftware.kryo.KryoSerializable
    • read

      public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
      Specified by:
      read in interface com.esotericsoftware.kryo.KryoSerializable
    • hashCode

      public int hashCode()
      Description copied from interface: Item
      Computes a hash code.
      Specified by:
      hashCode in interface Item
      Overrides:
      hashCode in class Object
      Returns:
      a hash code as an int.
    • getDynamicType

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

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

      public int getMutabilityLevel()
      Description copied from interface: Item
      Returns the mutability level of the item.
      Specified by:
      getMutabilityLevel in interface Item
      Returns:
      an int representing nestedness of the item inside transform expressions.
    • setMutabilityLevel

      public void setMutabilityLevel(int mutabilityLevel)
      Description copied from interface: Item
      Sets the mutability level of the item to a supplied value.
      Specified by:
      setMutabilityLevel in interface Item
      Parameters:
      mutabilityLevel - new mutability level.
    • getTopLevelID

      public long getTopLevelID()
      Description copied from interface: Item
      Returns the top level ID of the item.
      Specified by:
      getTopLevelID in interface Item
      Returns:
      int representing the rowID of the item within a DeltaFile.
    • setTopLevelID

      public void setTopLevelID(long topLevelID)
      Description copied from interface: Item
      Sets the top level ID of the item to a supplied value.
      Specified by:
      setTopLevelID in interface Item
      Parameters:
      topLevelID - new top level ID.
    • getPathIn

      public String getPathIn()
      Description copied from interface: Item
      Returns the path from the top level object of a DeltaFile for the item.
      Specified by:
      getPathIn in interface Item
      Returns:
      String representing the path of the item from the top level within a DeltaFile.
    • setPathIn

      public void setPathIn(String pathIn)
      Description copied from interface: Item
      Sets the path from the top level object of a DeltaFile for the item to a supplied value.
      Specified by:
      setPathIn in interface Item
      Parameters:
      pathIn - new path from top level.
    • getTableLocation

      public String getTableLocation()
      Description copied from interface: Item
      Returns the location of the DeltaFile for the item.
      Specified by:
      getTableLocation in interface Item
      Returns:
      String representing the location of the DeltaFile for the item.
    • setTableLocation

      public void setTableLocation(String location)
      Description copied from interface: Item
      Sets the location of the DeltaFile for the item to a supplied value.
      Specified by:
      setTableLocation in interface Item
      Parameters:
      location - new location of the DeltaFile for the item.
    • getSparkSQLValue

      public String getSparkSQLValue()
      Description copied from interface: Item
      Returns the SparkSQL value of the item for use in a query.
      Specified by:
      getSparkSQLValue in interface Item
      Returns:
      String representing the SparkSQL value of the item.
    • getSparkSQLValue

      public String getSparkSQLValue(ItemType itemType)
      Description copied from interface: Item
      Returns the SparkSQL value of the item for use in a query.
      Specified by:
      getSparkSQLValue in interface Item
      Returns:
      String representing the SparkSQL value of the item.
    • getSparkSQLType

      public String getSparkSQLType()
      Description copied from interface: Item
      Returns the SparkSQL type of the item for use in a query.
      Specified by:
      getSparkSQLType in interface Item
      Returns:
      String representing the SparkSQL type of the item.
    • atomizedValue

      public List<Item> atomizedValue()
      Specified by:
      atomizedValue in interface Item
    • 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.
      Specified by:
      getVariantValue in interface Item
      Returns:
      Object representing the converted value of the item.