I need create inverse map - select unique values and for them find keys. Seems that only way is to iterate all key/value pairs, because entrySet returns set of so value not
Take a look at Google Guava BiMap.
Example usage
Map map = new HashMap<>(); map.put(1, "one"); map.put(2, "two"); Map inverted = HashBiMap.create(map).inverse();