Package ca.uqac.lif.cep.tuples
Class AttributeGroup
java.lang.Object
ca.uqac.lif.cep.tuples.AttributeGroup
A group of attributes taken from the merging of one or more tuples.
Each attribute is identified by the name of the trace it comes
from.
- Author:
- Sylvain Hallé
-
Constructor Summary
ConstructorsConstructorDescriptionAttributeGroup(String[] names) Create a new attribute group, by specifying the names given to each tuple. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a tuple in a specific position in the groupgetAttribute(String attribute_name) Gets the value of an attribute by giving its name.getAttribute(String trace_name, String attribute_name) Gets the value of an attribute by giving its name and the of the tuple it comes from.toString()
-
Constructor Details
-
AttributeGroup
Create a new attribute group, by specifying the names given to each tuple.- Parameters:
names- The names
-
-
Method Details
-
add
Add a tuple in a specific position in the group- Parameters:
position- The position. This value should be at least 0 and at most the size of the name array minus one.t- The tuple to add
-
getAttribute
Gets the value of an attribute by giving its name and the of the tuple it comes from.- Parameters:
trace_name- The tuple name. Can be null.attribute_name- The attribute name- Returns:
- The value of the attribute, or
nullif not found
-
getAttribute
Gets the value of an attribute by giving its name. The method will look in all tuples for an attribute with that name, and return the first found.- Parameters:
attribute_name- The attribute name- Returns:
- The value of the attribute, or
nullif not found
-
toString
-