Guava: Multimap, Bimap

Multimap Multimap is a collection similar to a Map, but which may associate multiple values with a single key. So if you put the two value with the same key then multimap will map both value with the same key. Multimap has some very useful extension like ListMultimap , SetMultimap ArrayListMultimap implements the ListMultimap interface and uses an ArrayList to store the values for a given key. And HashMultimap implements the SetMultimap interface and it will not store the duplicate key-value pairs, same as Set behave. Here is the ArrayListMultimap example. Multimap<String, String> map1 = ArrayListMultimap.create(); map1.put("A", "Test1"); map1.put("B", "Test2"); map1.put("B", "Test3"); map1.put("A", "Test4"); map1.put("C", "Test5"); map1.put("X", "Test6"); Multimap<String, String> map2 = ArrayListMultimap.create(); map2.put(&quo