Class OrderingCompareAgent<T>
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.rete.util.OrderingCompareAgent<T>
-
public abstract class OrderingCompareAgent<T> extends java.lang.Object
Comparing 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 int
compare()
protected boolean
consider(int partial)
protected abstract void
doCompare()
protected static int
dontCare()
protected boolean
isUnknown()
protected static int
preferFalse(boolean b1, boolean b2)
protected static <U> int
preferLess(java.lang.Comparable<U> c1, U c2)
protected static <U> int
preferLess(U c1, U c2, java.util.Comparator<U> comp)
protected static <U> int
preferMore(java.lang.Comparable<U> c1, U c2)
protected static <U> int
preferMore(U c1, U c2, java.util.Comparator<U> comp)
protected static int
preferTrue(boolean b1, boolean b2)
protected boolean
swallowBoolean(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)
-
-