Class PredicateGet

  • 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 PredicateGet
    extends ca.uqac.lif.cep.functions.UnaryFunction<PredicateTuple,​java.lang.Object>
    Extracts the value at a specific position in the predicate tuple.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int m_position
      The position to extract from each tuple
      • Fields inherited from class ca.uqac.lif.cep.functions.Function

        s_maxInputArity
    • Constructor Summary

      Constructors 
      Constructor Description
      PredicateGet​(int position)
      Creates an instance of the function
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PredicateGet duplicate​(boolean with_state)  
      java.lang.Object getValue​(PredicateTuple x)  
      • Methods inherited from class ca.uqac.lif.cep.functions.UnaryFunction

        evaluate, getInputArity, getInputTypesFor, getOutputArity, getOutputTypeFor, reset
      • Methods inherited from class ca.uqac.lif.cep.functions.Function

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

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

      • m_position

        protected int m_position
        The position to extract from each tuple
    • Constructor Detail

      • PredicateGet

        public PredicateGet​(int position)
        Creates an instance of the function
        Parameters:
        position - The position to extract in a tuple. If position = 0, the name of the predicate tuple will be returned. Otherwise, the value at index position-1 in the arguments will be returned. The value null will be returned if the index is out of bounds with respect to the tuple being given.
    • Method Detail

      • getValue

        public java.lang.Object getValue​(PredicateTuple x)
        Specified by:
        getValue in class ca.uqac.lif.cep.functions.UnaryFunction<PredicateTuple,​java.lang.Object>
      • duplicate

        public PredicateGet duplicate​(boolean with_state)
        Specified by:
        duplicate in interface ca.uqac.lif.cep.Duplicable
        Overrides:
        duplicate in class ca.uqac.lif.cep.functions.UnaryFunction<PredicateTuple,​java.lang.Object>