commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From __matthewHawthorne <>
Subject Re: [collections] dup-key map and map intersections?
Date Mon, 19 Jan 2004 14:23:29 GMT
Phillip Rhodes wrote:
 > 1)  Is there any Map type of Container that allows me to have
 > duplicate keys that have different payloads (different values in the
 > value portion?
 > 2)  Is there a way that I can do an Intersection between two of these
 > maps and get the value portion of the map into an Collection type of
 > container?

Take a look at the org.apache.commons.collections.MultiHashMap class.  I 
think this will solve your 1st problem.

As for your 2nd problem, I don't know of a solution that is as 
convenient as your example.  However, you could do:


And I think that would do what you want.

Maybe a patch adding


would be considered?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message