Class LazyObjectItem

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

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

    • LazyObjectItem

      public LazyObjectItem()
  • 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.
    • getKeys

      public List<String> getKeys()
      Description copied from interface: Item
      Returns the keys of the item, if it is an object.
      Specified by:
      getKeys in interface Item
      Returns:
      the list of the keys.
    • getValues

      public List<Item> getValues()
      Description copied from interface: Item
      Returns the values of the item, if it is an object.
      Specified by:
      getValues in interface Item
      Returns:
      the list of the value items.
    • getItemByKey

      public Item getItemByKey(String s)
      Description copied from interface: Item
      Returns the value associated with a specific key, if it is an object.
      Specified by:
      getItemByKey in interface Item
      Parameters:
      s - a key.
      Returns:
      the value associated with key.
    • putItemByKey

      public void putItemByKey(String s, Item value)
      Description copied from interface: Item
      Adds a key-value pair, if it is an object item.
      Specified by:
      putItemByKey in interface Item
      Parameters:
      s - a key.
      value - a value.
    • putLazyItemByKey

      public void putLazyItemByKey(String s, RuntimeIterator iterator, DynamicContext context, boolean isArray)
      Description copied from interface: Item
      Adds a key-value pair, if it is an object item. The value is lazily computed.
      Specified by:
      putLazyItemByKey in interface Item
      Parameters:
      s - a key.
      iterator - a runtime iterator.
      context - a dynamic context.
      isArray - whether to always wrap the result in an array.
    • isObject

      public boolean isObject()
      Description copied from interface: Item
      Tests whether the item is an object.
      Specified by:
      isObject in interface Item
      Returns:
      true if it is an object, false otherwise.
    • 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.