Given a Map, how do I look up all keys associated with a particular value?
For example:
Map<Integer, Integer> map = new HashMap<Integer, Integer>();
map.put(1, 5);
map.put(2, 2);
map.put(3, 5);
Collection<Integer> keys = map.values(5); // should return {1, 3}
I'm looking for something similar to Google Collections' BiMap where values are not unique.