Guava bimap

A bimap (or "bidirectional map") is a map that preserves the uniqueness ofits values as well as that of its keys. This constraint enables bimaps tosupport an "inverse view", which is another bimap containing the same entriesas this bimap but with reversed keys and values.从注释来看,一个biMap是一个值有惟一性的Map。能够经过inverse()方法进行key与value的反转。若是put操做时,插入不一样key的相同value值,那么会抛出“Exception in thread "main" java.lang.IllegalArgumentException: value already present:”异常
相关文章
相关标签/搜索