Class TupleComparator

java.lang.Object
ca.uqac.lif.cep.tuples.TupleComparator
All Implemented Interfaces:
Comparator<Tuple>

public class TupleComparator extends Object implements Comparator<Tuple>
Compares two tuples according to the values of one or many of their attributes. Such a comparator can be used to sort a list of tuples.
Author:
Sylvain Hallé
  • Field Details

    • m_sortAttributes

      protected String[] m_sortAttributes
      The attributes over which to perform the comparison
  • Constructor Details

    • TupleComparator

      public TupleComparator(String... attributes)
      Creates a new tuple comparator
      Parameters:
      attributes - The attributes over which to perform the comparison
  • Method Details