Class FunctionItem

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

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

  • Method Details

    • getIdentifier

      public FunctionIdentifier getIdentifier()
      Description copied from interface: Item
      Returns the identifier (name and arity) of the function, if it is a function item.
      Specified by:
      getIdentifier in interface Item
      Returns:
      the function identifier.
    • getParameterNames

      public List<Name> getParameterNames()
      Description copied from interface: Item
      Returns the names of the parameters of the function, if it is a function item.
      Specified by:
      getParameterNames in interface Item
      Returns:
      the function parameter names.
    • getSignature

      public FunctionSignature getSignature()
      Description copied from interface: Item
      Returns the signature of the function, if it is a function item.
      Specified by:
      getSignature in interface Item
      Returns:
      the function signature.
    • getModuleDynamicContext

      public DynamicContext getModuleDynamicContext()
      Description copied from interface: Item
      Returns the module dynamic context, if it is a function item.
      Specified by:
      getModuleDynamicContext in interface Item
      Returns:
      the function signature.
    • getBodyIterator

      public RuntimeIterator getBodyIterator()
      Description copied from interface: Item
      Returns the body iterator, if it is a function item.
      Specified by:
      getBodyIterator in interface Item
      Returns:
      the function signature.
    • getLocalVariablesInClosure

      public Map<Name,List<Item>> getLocalVariablesInClosure()
      Description copied from interface: Item
      Returns the local variable bindings, if it is a function item.
      Specified by:
      getLocalVariablesInClosure in interface Item
      Returns:
      the function signature.
    • getRDDVariablesInClosure

      public Map<Name,org.apache.spark.api.java.JavaRDD<Item>> getRDDVariablesInClosure()
      Description copied from interface: Item
      Returns the RDD variable bindings, if it is a function item.
      Specified by:
      getRDDVariablesInClosure in interface Item
      Returns:
      the function signature.
    • getDFVariablesInClosure

      public Map<Name,JSoundDataFrame> getDFVariablesInClosure()
      Description copied from interface: Item
      Returns the DataFrame variable bindings, if it is a function item.
      Specified by:
      getDFVariablesInClosure in interface Item
      Returns:
      the function signature.
    • equals

      public boolean equals(Object other)
      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:
      other - another item.
      Returns:
      true it is equal to other, false otherwise.
    • 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.
    • isAtomic

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

      public boolean isFunction()
      Description copied from interface: Item
      Tests whether the item is a function.
      Specified by:
      isFunction in interface Item
      Returns:
      true if it is a function, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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.
    • 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
    • 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.
    • deepCopy

      public FunctionItem deepCopy()
    • populateClosureFromDynamicContext

      public void populateClosureFromDynamicContext(DynamicContext dynamicContext, ExceptionMetadata metadata)
    • isEstimator

      public boolean isEstimator()
      Specified by:
      isEstimator in interface Item
    • getEstimator

      public org.apache.spark.ml.Estimator<?> getEstimator()
      Specified by:
      getEstimator in interface Item
    • isTransformer

      public boolean isTransformer()
      Specified by:
      isTransformer in interface Item
    • getTransformer

      public org.apache.spark.ml.Transformer getTransformer()
      Specified by:
      getTransformer in interface Item
    • setModuleDynamicContext

      public void setModuleDynamicContext(DynamicContext dynamicModuleContext)
    • atomizedValue

      public List<Item> atomizedValue()
      Specified by:
      atomizedValue in interface Item