I am aware that Google’s guava and even Apache commons offer bi-directional maps. However, I would like to know how they are implemented. From the little I found, the most simplest way is to use 2 separate maps to store key/value and value/key data. However, surely there are better ways? Surely Google’s implementation is not this straightforward? Where is the magic?
Thanks!
Apparently that’s all it is (Louis Wasserman).