hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raghu Angadi <rang...@yahoo-inc.com>
Subject Re: hash Code of a reference.
Date Fri, 31 Aug 2007 02:38:14 GMT
Martin Traverso wrote:
> Try System.identityHashCode(...).
> 
> http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#identityHashCode(java.lang.Object)

Perfect. Exactly what I wanted. Thanks.

Raghu.

> Martin
> 
> On 8/30/07, Raghu Angadi <rangadi@yahoo-inc.com> wrote:
>>
>> I want to get hashCode of a reference, i.e. Object.hashCode() or
>> something similar. ref.hashCode() won't work since this perticular class
>> overrides hashCode(). Is there a simple way to get Object.hashCode() or
>> some other hash of a ref?
>>
>> Right now I am thinking of adding a method
>> 'int refHashCode() { return super.hashCode(); }' since this class
>> subclasses Object.
>>
>> Raghu.
>>
> 


Mime
View raw message