メモ: Mapのソートを簡単に書く

Memo

Map<String, Object> map;
map.entrySet().stream().sorted(Map.Entry.comparingByKey()).forEach(e->{
   // TODO e.getKey()  e.getValue() 
});

List<Map.Entry<String, Object>> list = map.entrySet().stream()
   .sorted(Map.Entry.comparingByValue()).collect(Collectors.toList());