This content has been marked as final. Show 1 reply
Stupid question perhaps, but a regular HashMap with a String as a key and an ArrayList as a value doesn't cut it? You really NEED duplicate keys also?
EDIT: yes that is a stupid suggestion; of course you need duplicate keys when it is in fact a duplicate key/value pair that we're talking about.
It will only allow "string" key and "integer" value.When I look at the Javadoc I see it is controlled by generics, just like the regular Map type. Here, even in this very old javadoc:
You can see that put() takes two Object values, not a String and an Integer.