Created
July 2, 2014 15:57
-
-
Save edipofederle/cf8b4ca6901cc308f3a5 to your computer and use it in GitHub Desktop.
sortMap.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ordering<Map.Entry<String, Double>> byMapValues = new Ordering<Map.Entry<String, Double>>() { | |
@Override | |
public int compare(Map.Entry<String, Double> left, Map.Entry<String, Double> right) { | |
return left.getValue().compareTo(right.getValue()); | |
} | |
}; | |
List<Map.Entry<String, Double>> edsValues = Lists.newArrayList(resultsEds.entrySet()); | |
Collections.sort(edsValues, byMapValues); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment