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




--
------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to