How do we decide on the best implementation of hashCode() method for a collection (assuming that equals method has been overridden correctly) ?
hashCode()
There's a good implementation of the Effective Java's hashcode() and equals() logic in Apache Commons Lang. Checkout HashCodeBuilder and EqualsBuilder.
hashcode()
equals()