Class AttributeGroup


  • public class AttributeGroup
    extends java.lang.Object
    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

      Constructors 
      Constructor Description
      AttributeGroup​(java.lang.String[] names)
      Create a new attribute group, by specifying the names given to each tuple.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int position, Tuple t)
      Add a tuple in a specific position in the group
      java.lang.Object getAttribute​(java.lang.String attribute_name)
      Gets the value of an attribute by giving its name.
      java.lang.Object getAttribute​(java.lang.String trace_name, java.lang.String attribute_name)
      Gets the value of an attribute by giving its name and the of the tuple it comes from.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AttributeGroup

        public AttributeGroup​(java.lang.String[] names)
        Create a new attribute group, by specifying the names given to each tuple.
        Parameters:
        names - The names
    • Method Detail

      • add

        public void add​(int position,
                        Tuple t)
        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

        public java.lang.Object getAttribute​(java.lang.String trace_name,
                                             java.lang.String attribute_name)
        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 null if not found
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.String attribute_name)
        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 null if not found
      • toString

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