Exactly. Instead of overriding the object in the map with the new value,
it gets added to a collection. Note that the collection is used even if
you only add one item.
Robert
>>> [EMAIL PROTECTED] 05/29/03 02:33PM >>>
Hm,
so if i do put(key, object1)
and then put(key, object2)
if i do get(key) i'll get a collection {object1,object2}?
Robert McIntosh wrote:
>That is exactly what the MultiMap and its default implementation of
>MultiHashMap is designed to do, store a Collection of items within a
>single key.
>
>Robert
>
>
>
>>>>[EMAIL PROTECTED] 05/29/03 02:25PM >>>
>>>>
>>>>
>Hello,
>
>I know this is probably a really stupid question but i am looking for
a
>
>HashMap (or similar)implementation that will store multiple objects
>under the same key. I wrote a superficial implementation myself
based
>
>on the HashMap, but I am interested to know if there is something out
>there already implementing this functionality. I really couldn't
>decypher if multimap would do this.
>
>Thanks,
>
>Denis
>
>
>---------------------------------------------------------------------
>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]
>
>
>
>
>
---------------------------------------------------------------------
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]