Is there a method (maybe with Google Collections) to obtain the min value of a Map(Key, Double)?
Map(Key, Double)
In the traditional way, I would have to sort the map ac
Using java 8 (and static imports). We can make @superfav's solution much tidier:
Map myMap; String theKeyWithHighestValue = Collections.min(myMap.entrySet(), comparingDouble(Entry::getValue)).getKey()