Class OrderingCompareAgent<T>
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.rete.util.OrderingCompareAgent<T>
-
public abstract class OrderingCompareAgent<T> extends java.lang.ObjectComparing agent for an ordering. Terminology: the "preferred" item will register as LESS.
-
-
Constructor Summary
Constructors Constructor Description OrderingCompareAgent(T a, T b)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompare()protected booleanconsider(int partial)protected abstract voiddoCompare()protected static intdontCare()protected booleanisUnknown()protected static intpreferFalse(boolean b1, boolean b2)protected static <U> intpreferLess(java.lang.Comparable<U> c1, U c2)protected static <U> intpreferLess(U c1, U c2, java.util.Comparator<U> comp)protected static <U> intpreferMore(java.lang.Comparable<U> c1, U c2)protected static <U> intpreferMore(U c1, U c2, java.util.Comparator<U> comp)protected static intpreferTrue(boolean b1, boolean b2)protected booleanswallowBoolean(boolean x)
-
-
-
Method Detail
-
doCompare
protected abstract void doCompare()
-
compare
public int compare()
- Returns:
- the result
-
isUnknown
protected boolean isUnknown()
-
consider
protected boolean consider(int partial)
-
swallowBoolean
protected boolean swallowBoolean(boolean x)
-
dontCare
protected static int dontCare()
-
preferTrue
protected static int preferTrue(boolean b1, boolean b2)
-
preferFalse
protected static int preferFalse(boolean b1, boolean b2)
-
preferLess
protected static <U> int preferLess(java.lang.Comparable<U> c1, U c2)
-
preferLess
protected static <U> int preferLess(U c1, U c2, java.util.Comparator<U> comp)
-
preferMore
protected static <U> int preferMore(java.lang.Comparable<U> c1, U c2)
-
preferMore
protected static <U> int preferMore(U c1, U c2, java.util.Comparator<U> comp)
-
-