双向地图
问题描述:
你能否建议一种地图或类似的数据结构,我们可以同样轻松地获得彼此的价值和关键。也就是说,每个都可以用于查找其他。
Can you suggest a kind of map or similar data structure where we can get both the value and key from each other at equal ease. That is to say, that each may be used to find other.
答
Java在其标准中没有双向映射库。
Java doesn't have a bidirectional map in its standard library.
例如使用 Google Guava 。