Package 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)
-
-
Constructor Summary
Constructors Constructor Description ConsequentSortComparator(Comparator<Invariant> c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Invariant inv1, Invariant inv2)
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
ConsequentSortComparator
public ConsequentSortComparator(Comparator<Invariant> c)
-
-