Java doesn’t have a bidirectional map in its standard library.
Use for example BiMap<K, V>
from Google Guava .
More Related Contents:
- Count number of values of a list having same hash value in java?
- How do I efficiently iterate over each entry in a Java Map?
- How to sort Map values by key in Java?
- How can I initialise a static Map?
- How to directly initialize a HashMap (in a literal way)?
- Java Class that implements Map and keeps insertion order?
- What’s the difference between ConcurrentHashMap and Collections.synchronizedMap(Map)?
- What is the difference between the HashMap and Map objects in Java?
- Java time-based map/cache with expiring keys [closed]
- Convert a JSON String to a HashMap
- How do I convert a Map to List in Java?
- Case insensitive string as HashMap key
- How to remove a key from HashMap while iterating over it? [duplicate]
- Java – How to create new Entry (key, value)
- HashMap to return default value for non-found keys?
- How do I use the new computeIfAbsent function?
- How can I sort Map values by key in Java?
- How do you create a dictionary in Java? [closed]
- Partial search in HashMap
- Java API for plural forms of English words
- How to check whether given string is a word
- Is using java Map.containsKey() redundant when using map.get()
- Convert JSONObject to Map
- Convert Set to HashMap
- Sorting the Map in descending order based on the value [duplicate]
- Most elegant way to join a Map to a String in Java 8
- How to convert a string to a HashMap? [duplicate]
- Consumer mapped Class in HashMap
- How to Maintain order of insertion [duplicate]
- Group by field name in Java