Class OrderingCompareAgent<T>
java.lang.Object
tools.refinery.interpreter.rete.util.OrderingCompareAgent<T>
Comparing agent for an ordering. Terminology: the "preferred" item will register as LESS.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare()protected booleanconsider(int partial) protected abstract voidprotected static intdontCare()protected booleanprotected static intpreferFalse(boolean b1, boolean b2) protected static <U> intpreferLess(Comparable<U> c1, U c2) protected static <U> intpreferLess(U c1, U c2, Comparator<U> comp) protected static <U> intpreferMore(Comparable<U> c1, U c2) protected static <U> intpreferMore(U c1, U c2, Comparator<U> comp) protected static intpreferTrue(boolean b1, boolean b2) protected booleanswallowBoolean(boolean x)
-
Field Details
-
a
-
b
-
-
Constructor Details
-
OrderingCompareAgent
- Parameters:
a-b-
-
-
Method Details
-
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
-
preferLess
-
preferMore
-
preferMore
-