code: public static int compareUnbound(final Comparable<?> obj1, final Object obj2) throws ClassCastException {
          if (obj1 == obj2) {
              return 0;
          }
          if (obj1 == null) {
              return -1;
          }
          if (obj2 == null) {
              return 1;
          }
  
          @SuppressWarnings("unchecked") final Comparable<Object> castedObj1 = (Comparable<Object>) obj1;
          return castedObj1.compareTo(obj2);
      }
docs: Compares two objects with an unbound (and thus unsafe) {@link Comparable}
  . Use {@link #compare(Comparable, Object)} if possible.
  
  @param obj1
  @param obj2
  @return a negative integer, zero, or a positive integer as the first
  argument is less than, equal to, or greater than the second.
  
  @throws ClassCastException
  if obj1's Comparable type is not compatible with the argument
  obj2.