[ https://issues.apache.org/jira/browse/COLLECTIONS-708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16922219#comment-16922219 ]
Chen edited comment on COLLECTIONS-708 at 9/10/19 6:21 AM: ----------------------------------------------------------- Hi [~ggregory] Is that the hashcode for Collection implemented using Equator hash? {code:java} int hashCode = 1; for (final E: collection B){ hashCode = 31 * hashCode + equator. hash (e); } {code} was (Author: guoping1): Hi [~ggregory] Is that the hashcode for Collection implemented using Equator hash? int hashCode = 1; for (final E: collection B){ hashCode = 31 * hashCode + equator. hash (e); } > Create CollectionUtils.hashCode using Equator > --------------------------------------------- > > Key: COLLECTIONS-708 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-708 > Project: Commons Collections > Issue Type: Improvement > Components: Collection > Affects Versions: 4.2 > Reporter: Andrei Ivanov > Priority: Major > > Hello, > After discovering {{CollectionUtils#isEqualCollection}} that uses an > {{Equator}}, I've started to implement {{Equator}} s for my classes, only to > discover that I can't generate hashCodes for the collections that hold these > classes using {{Equator#hash}}. > I hope something like {{CollectionUtils#hashCode(Collection, Equator)}} can > be implemented. -- This message was sent by Atlassian Jira (v8.3.2#803003)