我正在尝试根据中的值将 a 转换Map
为有序的。List
Map
假设我有以下内容:
Map<String, Integer> map = Maps.newHashMap();
map.put("foo", 1);
map.put("boo", 3);
map.put("bar", 2);
//list needs to be sorted by Integer Value -- ASC or DESC
List<String> list = //Elegant guava call? List should be: {foo, bar, boo}