More specifically I want an interface to compare objects which can be only compared for equality [e.g. complex numbers] but don\'t have total order on them.
It should have [Not
I would suggest using a function based approach to generate the buckets like the MultiMaps.index() method in Google collections (now Guava) does. They use a Function which maps objects of type V to keys of type K (in your case the buckets).