@SuppressWarnings({"rawtypes", "unchecked"}) // for cast to Comparable
  static int compareComparables(Class<?> kc, Object k, Object x) {
    return (x == null || x.getClass() != kc ? 0 : ((Comparable) k).compareTo(x));
  }
Returns k.compareTo(x) if x matches kc (k's screened comparable class), else 0.
geode-core/src/main/java/org/apache/geode/internal/concurrent/CompactConcurrentHashSet2.java