Alex Rivera | Logout

Best implementation for hashCode method for a collection

Asked 2008-09-22T06:53:35.333
330

How do we decide on the best implementation of hashCode() method for a collection (assuming that equals method has been overridden correctly) ?

Edit
Report

1 Answer

1

I prefer using utility methods fromm Google Collections lib from class Objects that helps me to keep my code clean. Very often equals and hashcode methods are made from IDE's template, so their are not clean to read.

answered 2008-09-22T08:51:42.773

Your Answer