Class OrderingCompareAgent<T>

java.lang.Object
tools.refinery.interpreter.rete.util.OrderingCompareAgent<T>

public abstract class OrderingCompareAgent<T> extends Object
Comparing agent for an ordering. Terminology: the "preferred" item will register as LESS.
  • Field Details

    • a

      protected T a
    • b

      protected T b
  • Constructor Details

    • OrderingCompareAgent

      protected OrderingCompareAgent(T a, T b)
      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

      protected static <U> int preferLess(Comparable<U> c1, U c2)
    • preferLess

      protected static <U> int preferLess(U c1, U c2, Comparator<U> comp)
    • preferMore

      protected static <U> int preferMore(Comparable<U> c1, U c2)
    • preferMore

      protected static <U> int preferMore(U c1, U c2, Comparator<U> comp)