HashMap<Integer, Double> map = new HashMap<>();
.
.
.
// keyλ§ μλ list μμ±
List<Integer> list = new ArrayList<>(map.keySet());
// λλ Valueλ§ μλ list μμ±
List<Integer> list = new ArrayList<>(map.values());
.
.
.
// 1.
Collections.sort(list);
// 2.
Collections.sort(list, (o1, o2) -> (map.get(o2).compareTo(map.get(o1))));
Collections.sort(list, (o1, o2) -> (map.get(o1).compareTo(map.get(o2))));