code: private int compare(Object k1, Object k2) {
          return (mComparator==null ? ((Comparable)k1).compareTo(k2)
                  : mComparator.compare(k1, k2));
      }
docs: Compares two keys using the correct comparison method for this
  Collection.
  @param k1 The first item to be compared.
  @param k2 The second item to be compared.
  @return a positive or negative integer if they differ, and zero if
  equal.