Java Hashmap: How to get key from value?
If you choose to use the Commons Collections library instead of the standard Java Collections framework, you can achieve this with ease. The BidiMap interface in the Collections library is a bi-directional map, allowing you to map a key to a value (like normal maps), and also to map a value to a key, thus allowing you to perform … Read more