equals/hashCode contract
Equal objects must have equal hash codes, and equals must be reflexive, symmetric, transitive, consistent and false for null.
java.lang.Object's contract requires equals to be an equivalence relation that returns false for null, and a.equals(b) to imply a.hashCode() == b.hashCode(); hash-based collections rely on it.
See also