Your case basically needs a HashMap.
Just put key as key and value as value in a HashMap.
This is because key will any ways be unique and in case there is collision in values HashMap maintains a linked list for storing all these colliding values.In case any value is same as any earlier value in the linked list it simply replaces the old one with the new one.
For ex.
As per your requirement :
Key1 aaaa -- should be stored
Key1 bbbb -- should be stored
Key1 aaaa -- should not be stored as it is duplicate.
So basically hashmap will store "aaaa" and "bbbb"values against "key1" as the key.
Later when we try storing "aaaa" again against "key1" then older stored value "aaaa" will simply be replaced.
Hence, duplicacy of values is automatically handled by hashmap.
Hence , you can make use of HashMap in your case.