code: public static <E> int compare(final Comparable<E> obj1, final E obj2) {
          if (obj1 == obj2) {
              return 0;
          }
          if (obj1 == null) {
              return -1;
          }
          if (obj2 == null) {
              return 1;
          }
  
          return obj1.compareTo(obj2);
      }
docs: Compares two objects of which one of them is a comparable of the other.
  
  @param <E>
  @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.