I agree, hash and equivalence are tied so strongly together that they have to be implemented in the same class. Maybe it's just the class name which disturbed me: a comparator which offers functionalities working on a single object (not comparing two objects). But since hashes may be needed for efficient equivalence calculation I am convinced.