At 08:52 23.12.99 -0600, you wrote:
>
>
>Zeljko Trogrlic wrote:
>
>> Hi,
>>
>> I found something suspicious in ConcreteElement. Both registry (Hashtable)
>> and registryList (Vector) are based on element's hashcode converted to
>String.
>>
>> Is it safe to use hashcodes as unique is because they are not unique for
>> elements - it's perfectly legal to have two or more different elements with
>> same hash?
>>
>> Why conversion to String?
>
>Because hashcodes are stored as primitive integers and it's easier to
>treat every
>object key as a string then trying to manipulate it as an object.h
>
>-stephan
But my question is still open: is it safe because they are not unique to
element?
And isn't it easier and faster to simply wrap int with Integer rather than
convert it to String?
Zeljko Trogrlic
____________________________________________________________
@-solutions GmbH
Grillparzer Str. 14; D-81675 Muenchen
Tel.: 089/45 79 0-351; Fax.: 089/45 79 0-321
Email: mailto:[EMAIL PROTECTED] WWW: http://www.at-solutions.de
--
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]