cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ola Berg <>
Subject Re: Calculating the cache key
Date Wed, 29 May 2002 07:13:30 GMT
>sorry, but I don\'t understand why the resultant 
>hashCode should not an even
>number. My understanding of a hashCode funktion is, 
>that it should generate
>homogeneous values.

Yes, but the default hashCode function generates even numbers. So in order to recieve more
balance when you mix your objects with objects using the default hashCode, your hashCodes
should be uneven.

If you don\'t intend to mix, your hash codes should be evenly distributed.

Personally, I think this is a \"bug\" or at least an undesired feature in Java. The method
\"hashCode()\" should naturally return evenly distributed numbers, both even and uneven.


0733 - 99 99 17

To unsubscribe, e-mail:
For additional commands, email:

View raw message