What methods should go into a java.util.Objects class in JDK 7? (original) (raw)

Jason Mehrens jason_mehrens at hotmail.com
Fri Oct 2 18:26:08 UTC 2009


By toIdentityString, do you mean the String that would be returned by toString if toString is not overridden?

-Joe

Yep. As in:

return o != null ? o.getClass().getName() +'@'+ Integer.toHexString(System.identityHashCode(o)) : "null";

I suppose the name should be identityToString to match System.identityHashCode???

Jason


Insert movie times and more without leaving HotmailĀ®. http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20091002/660c24e7/attachment.html>



More information about the core-libs-dev mailing list