How to Use Guava BiMap for Inverse Map Lookup
A BiMap is useful in scenarios where you need to look up data in both directions.
For example, if you have a mapping between employee IDs and names, and you want to quickly retrieve an employee’s ID based on their name or vice versa, a BiMap can provide this functionality.
Guava provides an implementation of the BiMap interface called HashBiMap. Let’s see you can use it.