docs: @SuppressWarnings("unchecked")
      public static int compare(Object a, Object b) {
          if (a == b) {
              return 0;
          }
          if (a == null) {
              return -1;
          }
          if (b == null) {
              return 1;
          }
          if (a instanceof Comparable) {
              Comparable comparable = (Comparable)a;
              return comparable.compareTo(b);
          }
          int answer = a.getClass().getName().compareTo(b.getClass().getName());
          if (answer == 0) {
              answer = a.hashCode() - b.hashCode();
          }
          return answer;
      }