code: @SuppressWarnings("unchecked")
      public static int compare(Comparable lhs, Comparable rhs) {
          assert lhs != null;
          assert rhs != null;
  
          if (lhs.getClass() == rhs.getClass()) {
              return lhs.compareTo(rhs);
          }
  
          if (lhs instanceof Number && rhs instanceof Number) {
              return Numbers.compare(lhs, rhs);
          }
  
          return lhs.compareTo(rhs);
      }
docs: Compares the provided {@link Comparable} instances.
  <p>
  Special numeric comparison logic is used for {@link Double}, {@link Long},
  {@link Float}, {@link Integer}, {@link Short} and {@link Byte}. See
  {@link Numbers#compare(Comparable, Comparable)} for more details.
  
  @param lhs the left-hand side {@link Comparable}. Can't be {@code null}.
  @param rhs the right-hand side {@link Comparable}. Can't be {@code null}.
  @return a negative integer, zero, or a positive integer as the left-hand
  side {@link Comparable} is less than, equal to, or greater than the
  right-hand side {@link Comparable}.