Class ProjectTuple

java.lang.Object
ca.uqac.lif.cep.functions.Function
ca.uqac.lif.cep.tuples.ProjectTuple
All Implemented Interfaces:
ca.uqac.lif.cep.Duplicable, ca.uqac.lif.cep.functions.DuplicableFunction

public class ProjectTuple extends ca.uqac.lif.cep.functions.Function
Creates an output tuple from input tuples by combining their values.
  • Field Details

    • m_inputArity

      protected int m_inputArity
      The function's input arity
    • m_pairs

      protected ProjectTuple.NameFunctionPair[] m_pairs
      The list of associations between the output tuple's key and its corresponding value
    • m_builder

      protected FixedTupleBuilder m_builder
      The builder used to create the output tuples
  • Constructor Details

    • ProjectTuple

      public ProjectTuple(int input_arity, ProjectTuple.NameFunctionPair... pairs)
      Creates a new instance of the function
      Parameters:
      input_arity - The function's input arity
      pairs - The list of associations between the output tuple's key and its corresponding value
    • ProjectTuple

      public ProjectTuple(ProjectTuple.NameFunctionPair... pairs)
      Creates a new instance of the function
      Parameters:
      pairs - The list of associations between the output tuple's key and its corresponding value
  • Method Details

    • evaluate

      public void evaluate(Object[] inputs, Object[] outputs, ca.uqac.lif.cep.Context context)
      Specified by:
      evaluate in class ca.uqac.lif.cep.functions.Function
    • getInputArity

      public int getInputArity()
      Specified by:
      getInputArity in class ca.uqac.lif.cep.functions.Function
    • getOutputArity

      public int getOutputArity()
      Specified by:
      getOutputArity in class ca.uqac.lif.cep.functions.Function
    • getInputTypesFor

      public void getInputTypesFor(Set<Class<?>> classes, int index)
      Specified by:
      getInputTypesFor in class ca.uqac.lif.cep.functions.Function
    • getOutputTypeFor

      public Class<?> getOutputTypeFor(int index)
      Specified by:
      getOutputTypeFor in class ca.uqac.lif.cep.functions.Function
    • duplicate

      public ca.uqac.lif.cep.functions.Function duplicate(boolean with_state)
      Specified by:
      duplicate in interface ca.uqac.lif.cep.Duplicable
      Specified by:
      duplicate in class ca.uqac.lif.cep.functions.Function