Click to See Complete Forum and Search --> : Java equivalent of MultiHashMap


guptrgp
May 1st, 2007, 01:49 PM
Just started a project in C#( java and c background).
I am trying to find a class similar to MultiHashMap..

Meaning a HashMap with capability of storing duplicate keys..
key value pair where key can be duplicated.

For example : A customer owing more than one cars.

customer ID being the key and each car record detail being the values.

Thanks in Advance...

darwen
May 1st, 2007, 03:08 PM
Not exactly, however you can do this :


Dictionary< string, List< string > > mapCustomerNameToCarList = new Dictionary< string, List< string > >();


Darwen.