I've experimented with writing the required contract for equals in the JavaDoc. But the requirement that hashCode is consistent with equals results in a very complex contract for hashCode. So I gave up and created abstract base class with a final implementation of the two methods instead.