Package ca.uqac.lif.cep.tuples
Class GetAttribute
- java.lang.Object
-
- ca.uqac.lif.cep.functions.Function
-
- ca.uqac.lif.cep.functions.UnaryFunction<AttributeGroup,java.lang.Object>
-
- ca.uqac.lif.cep.tuples.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 anAttributeGroup
- Author:
- Sylvain Hallé
-
-
Constructor Summary
Constructors Constructor Description GetAttribute(java.lang.String attribute_name)
Creates a new instance of the functionGetAttribute(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 getjava.lang.String
getTraceName()
Gets the name of the trace to get the attribute fromjava.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
-
-
-
-
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 fromattribute_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 classca.uqac.lif.cep.functions.UnaryFunction<AttributeGroup,java.lang.Object>
-
duplicate
public GetAttribute duplicate(boolean with_state)
- Specified by:
duplicate
in interfaceca.uqac.lif.cep.Duplicable
- Overrides:
duplicate
in classca.uqac.lif.cep.functions.UnaryFunction<AttributeGroup,java.lang.Object>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
build
public static void build(java.util.ArrayDeque<java.lang.Object> stack)
-
-