карта Java в LinkedHashmap с восходящим порядком ключей

Map<String, Integer> unSortedMap = getUnSortedMap();

//LinkedHashMap preserve the ordering of elements in which they are inserted
LinkedHashMap<String, Integer> sortedMap = new LinkedHashMap<>();

unSortedMap.entrySet()
  .stream()
  .sorted(Map.Entry.comparingByKey())
  .forEachOrdered(x -> sortedMap.put(x.getKey(), x.getValue()));
Cookies4Techies