code: public static <T> SerializableComparator<T> hashCodeComparator() {
        return (o1, o2) -> {
           if (o1 == o2) {
              return 0;
           } else if (o1 == null) {
              return 1;
           } else if (o2 == null) {
              return -1;
           }
           return Integer.compare(o1.hashCode(), o2.hashCode());
        };
     }
docs: Compares two objects based on their hashcode.
  
  @param <T> the type of object being compared
  @return A simplistic comparator that compares hash code values