I guess right of the bat your keys cannot contain the _ character.
A regular hash map key must support the hashCode method that matches its equals 
method.

My understanding is that the MultiKey map does this for you automatically. It 
also allows using non String objects as key components.
 

-----Original Message-----
From: Mark Shifman [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 21, 2005 2:09 PM
To: Jakarta Commons Users List
Subject: [Collections] MultiKeyMap vs concatenating keys that are strings

Hi:

If I am building a map with a compound key composed of say 3 strings , is there 
any advantage to using MultiKeyMap over a regular Hash(ed)Map with the key = 
key1+"_"+key2+"_"+key3;

speed?..elegance??

thanks in advance
mas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to