Denis Kishenko wrote:

<lurker-mode-off>
> Example of using
> 
> 
>     public int hashCode() {
>        HashCode hash = new HashCode();
>        hash.append(m00);
>        hash.append(m01);
>        hash.append(m02);
>        hash.append(m10);
>        hash.append(m11);
>        hash.append(m12);
>        return hash.hashCode();
>    }
> (...)
> Any comments?

How about
return Arrays.hashCode(new Object[] {x, y, name});
?
Short, concise, a bit allocation-heavy (esp. for primitives (boxing)), but
for non-critical hashes should be fine.
</lurker-mode-off>
-KS

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to