Please explain your problem clearly. It looks like you are confusing "unique" and "non-unique". HashMap
requires that keys are unique.
The
Apache Jakarta Commons Collections library contains extra collection classes that aren't in the standard
Java API. Maybe class MultiKeyMap or MultiValueMap in that library is what you are looking for?