Package ca.uqac.lif.cep.tuples
Class AttributeExpression
- java.lang.Object
-
- ca.uqac.lif.cep.tuples.AttributeExpression
-
public class AttributeExpression extends java.lang.ObjectAssociation between an expression to compute a value from an AttributeGroup and an attribute name. ASELECTprocessor is made of one or more such expressions; each is responsible for computing the value of one of the attributes of the output tuple, expressed in terms of elements of an inputAttributeGroup. In terms of SQL, this corresponds to the "exp AS somename" construct following theSELECTkeyword.- Author:
- Sylvain Hallé
-
-
Field Summary
Fields Modifier and Type Field Description protected ca.uqac.lif.cep.functions.Functionm_expressionThe expression to compute the output valueprotected java.lang.Stringm_targetNameThe attribute name to be given to this value
-
Constructor Summary
Constructors Modifier Constructor Description protectedAttributeExpression()AttributeExpression(ca.uqac.lif.cep.functions.Function expression, java.lang.String name)Creates a new attribute expression
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidbuild(java.util.ArrayDeque<java.lang.Object> stack)java.lang.StringgetName()Gets the attribute name given to that expressionjava.lang.ObjectgetValue(AttributeGroup group)Gets the value associated to the attribute namejava.lang.StringtoString()
-
-
-
Constructor Detail
-
AttributeExpression
protected AttributeExpression()
-
AttributeExpression
public AttributeExpression(ca.uqac.lif.cep.functions.Function expression, java.lang.String name)Creates a new attribute expression- Parameters:
expression- The expression to compute the output valuename- The attribute name to be given to this value
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the attribute name given to that expression- Returns:
- The name
-
getValue
public java.lang.Object getValue(AttributeGroup group)
Gets the value associated to the attribute name- Parameters:
group- The attribute group from which the value is to be computed- Returns:
- The value
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
build
public static void build(java.util.ArrayDeque<java.lang.Object> stack)
-
-