> + /** > + * Implement a hash code for this comparator that is consistent with > + * {@link #equals}. > + * > + * @return a hash code for this comparator. > + * @since Collections 2.2 > + */ > + public int hashCode() { > + return "ComparableComparator".hashCode(); > + }
You could make that a little bit clearer by making it a constant. ie private static final HASH_CODE = "ComparableComparator".hashCode(); And it'll improve performance. ;-) Rich
signature.asc
Description: This is a digitally signed message part