Mapa Java para LinkedHashmap com ordem ascendente das chaves
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