Package ca.uqac.lif.cep.tuples
Class TupleComparator
java.lang.Object
ca.uqac.lif.cep.tuples.TupleComparator
- All Implemented Interfaces:
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
FieldsModifier and TypeFieldDescriptionprotected String[]The attributes over which to perform the comparison -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
m_sortAttributes
The attributes over which to perform the comparison
-
-
Constructor Details
-
TupleComparator
Creates a new tuple comparator- Parameters:
attributes- The attributes over which to perform the comparison
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<Tuple>
-