Class ProjectTuple

  • All Implemented Interfaces:
    ca.uqac.lif.azrael.Printable, ca.uqac.lif.azrael.Readable, 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.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ProjectTuple.NameFunctionPair
      Associates a tuple's key to a function to be evaluated on input tuples
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected FixedTupleBuilder m_builder
      The builder used to create the output tuples
      protected int m_inputArity
      The function's input arity
      protected ProjectTuple.NameFunctionPair[] m_pairs
      The list of associations between the output tuple's key and its corresponding value
      • Fields inherited from class ca.uqac.lif.cep.functions.Function

        s_maxInputArity
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ca.uqac.lif.cep.functions.Function duplicate​(boolean with_state)  
      void evaluate​(java.lang.Object[] inputs, java.lang.Object[] outputs, ca.uqac.lif.cep.Context context, ca.uqac.lif.cep.EventTracker tracker)  
      int getInputArity()  
      void getInputTypesFor​(java.util.Set<java.lang.Class<?>> classes, int index)  
      int getOutputArity()  
      java.lang.Class<?> getOutputTypeFor​(int index)  
      • Methods inherited from class ca.uqac.lif.cep.functions.Function

        duplicate, evaluate, evaluate, evaluateLazy, evaluatePartial, print, printState, read, readState, reset
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • m_inputArity

        protected int m_inputArity
        The function's input arity
      • m_builder

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

      • 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 Detail

      • evaluate

        public void evaluate​(java.lang.Object[] inputs,
                             java.lang.Object[] outputs,
                             ca.uqac.lif.cep.Context context,
                             ca.uqac.lif.cep.EventTracker tracker)
        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​(java.util.Set<java.lang.Class<?>> classes,
                                     int index)
        Specified by:
        getInputTypesFor in class ca.uqac.lif.cep.functions.Function
      • getOutputTypeFor

        public java.lang.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