code: @SuppressWarnings("unchecked")
     public static int compare(Object o1, Object o2) {
        if (o1 == null && o2 == null) {
           return 0;
        } else if (o1 == null) {
           return 1;
        } else if (o2 == null) {
           return -1;
        }
        return Cast.<Comparable>as(o1).compareTo(o2);
     }
docs: Compare int.
  
  @param o1 the o 1
  @param o2 the o 2
  @return the int