[
https://issues.apache.org/jira/browse/LANG-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631465#action_12631465
]
Sebb commented on LANG-411:
---------------------------
The hashCode calculations are all available as overloaded methods on a
HashCodeBuilder instance:
{code}
int hash = new HashCodeBuilder(17, 37).append(name)
{code}
If there really is a need to simplify this with a static method call for each
different type, then a patch (with Javadoc and test cases) would be helpful.
> HashCodeBuilder: expose typed hashing methods
> ---------------------------------------------
>
> Key: LANG-411
> URL: https://issues.apache.org/jira/browse/LANG-411
> Project: Commons Lang
> Issue Type: Wish
> Affects Versions: 2.3
> Reporter: Paul Benedict
> Priority: Minor
> Fix For: 3.0
>
>
> HashCodeBuilder encapsulates the good advice of Joshua Bloch. He details how
> each java.lang type should be hashed. I want to use those too ... but without
> reflection. Please expose those as static methods:
> hashInt, hashBoolean, etc.
> They should take two parameters: the field value, and the hash multiplier
> value.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.