Class GetAttribute

  • 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 GetAttribute
    extends ca.uqac.lif.cep.functions.UnaryFunction<AttributeGroup,​java.lang.Object>
    Gets the value of an attribute in an AttributeGroup
    Author:
    Sylvain Hallé
    • Field Summary

      • Fields inherited from class ca.uqac.lif.cep.functions.Function

        s_maxInputArity
    • Constructor Summary

      Constructors 
      Constructor Description
      GetAttribute​(java.lang.String attribute_name)
      Creates a new instance of the function
      GetAttribute​(java.lang.String trace_name, java.lang.String attribute_name)
      Creates a new instance of the function
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void build​(java.util.ArrayDeque<java.lang.Object> stack)  
      GetAttribute duplicate​(boolean with_state)  
      java.lang.String getAttributeName()
      Gets the name of the attribute to get
      java.lang.String getTraceName()
      Gets the name of the trace to get the attribute from
      java.lang.Object getValue​(AttributeGroup g)  
      java.lang.String toString()  
      • 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, wait, wait, wait
    • Constructor Detail

      • GetAttribute

        public GetAttribute​(java.lang.String trace_name,
                            java.lang.String attribute_name)
        Creates a new instance of the function
        Parameters:
        trace_name - The name of the trace to get the attribute from
        attribute_name - The name of the attribute to get
      • GetAttribute

        public GetAttribute​(java.lang.String attribute_name)
        Creates a new instance of the function
        Parameters:
        attribute_name - The name of the attribute to get
    • Method Detail

      • getAttributeName

        public java.lang.String getAttributeName()
        Gets the name of the attribute to get
        Returns:
        The name
      • getTraceName

        public java.lang.String getTraceName()
        Gets the name of the trace to get the attribute from
        Returns:
        The name; null if no name has been given
      • getValue

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • build

        public static void build​(java.util.ArrayDeque<java.lang.Object> stack)