2006/7/27, Ivanov, Alexey A <[EMAIL PROTECTED]>:
It can handle Objects and uses object.hashCode().
Yep, HashCode has been already doing this.

combine() performs the calculations. append() is a convenience method
that returns the object it was called upon, so that your example can be
re-written as follows:

    public int hashCode() {
       return new HashCode().append(m00)
                            .append(m01)
                                .append(m02)
                                .append(m10)
                                .append(m11)
                                .append(m12)
                            .hashCode();
   }

It's like StringBuffer.append().
Thanks, I understad the author's idea. It has something common with
Krzysztof's mehtod

return Arrays.hashCode(new Object[] {x, y, name});


--
Denis M. Kishenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to