code: @SuppressWarnings({ "rawtypes", "unchecked" })
    static boolean evalComparable(CompareOperator comparator, Comparable arg1, Comparable arg2) {
  
      Class<?> type1 = arg1.getClass();
      Class<?> type2 = arg2.getClass();
      int delta;
      if (type1.equals(type2) || type1.isAssignableFrom(type2)) {
        delta = signum(arg1.compareTo(arg2));
      } else if (type2.isAssignableFrom(type1)) {
        delta = -signum(arg2.compareTo(arg1));
      } else {
        // incompatible comparables
        return (arg1.equals(arg2) == comparator.isTrueIfEquals());
      }
      return comparator.eval(delta);
    }
docs: Logic for {@link CompareOperator#eval(Object, Object)} with {@link Comparable} arguments.
  
  @param comparator is the {@link CompareOperator}.
  @param arg1 is the first argument.
  @param arg2 is the second argument.
  @return the result of the {@link CompareOperator} applied to the given arguments.