I want to have a map with duplicate keys.
I know there are many map implementations (Eclipse shows me about 50), so I bet there must be one that allows this. I know
Learn from my mistakes...please don't implement this on your own. Guava multimap is the way to go.
A common enhancement required in multimaps is to disallow duplicate keys-value pairs.
Implementing/changing this in a your implementation can be annoying.
In Guava its as simple as:
HashMultimap no_dupe_key_plus_val = HashMultimap.create();
ArrayListMultimap allow_dupe_key_plus_val = ArrayListMultimap.create();