Package ca.uqac.lif.cep.tuples
Class TupleComparator
- java.lang.Object
-
- ca.uqac.lif.cep.tuples.TupleComparator
-
- All Implemented Interfaces:
java.util.Comparator<Tuple>
public class TupleComparator extends java.lang.Object implements java.util.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 Summary
Fields Modifier and Type Field Description protected java.lang.String[]
m_sortAttributes
The attributes over which to perform the comparison
-
Constructor Summary
Constructors Constructor Description TupleComparator(java.lang.String... attributes)
Creates a new tuple comparator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Tuple x, Tuple y)
-