daikon.diff
Class ConsequentSortComparator
Object
ConsequentSortComparator
- All Implemented Interfaces:
- Comparator<Invariant>
public class ConsequentSortComparator
- extends Object
- implements Comparator<Invariant>
Comparator for sorting invariants. If an invariant is an
implication, its consequent is used instead of the whole invariant.
If the consequents of two invariants are equal, the predicates are
compared. The predicates and consequents themselves are compared
using the Comparator c passed to the constructor. Some examples:
this.compare(A->B, A->C) == c.compare(B, C)
this.compare(B, A->C) == c.compare(B, C)
this.compare(B, C) == c.compare(B, C)
this.compare(A->C, B->C) == c.compare(A, B)
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConsequentSortComparator
public ConsequentSortComparator(Comparator<Invariant> c)
compare
public int compare(Invariant inv1,
Invariant inv2)
- Specified by:
compare in interface Comparator<Invariant>