Mapa de Java a Linkedhashmap con orden ascendente de claves
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