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 TypeMethodDescriptionint
compare()
protected boolean
consider
(int partial) protected abstract void
protected static int
dontCare()
protected boolean
protected static int
preferFalse
(boolean b1, boolean b2) protected static <U> int
preferLess
(Comparable<U> c1, U c2) protected static <U> int
preferLess
(U c1, U c2, Comparator<U> comp) protected static <U> int
preferMore
(Comparable<U> c1, U c2) protected static <U> int
preferMore
(U c1, U c2, Comparator<U> comp) protected static int
preferTrue
(boolean b1, boolean b2) protected boolean
swallowBoolean
(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
-