I know how to \"transform\" a simple Java List from Y -> Z, i.e.:
List x;
List y = x.stre
An alternative that always exists for learning purpose is to build your custom collector through Collector.of() though toMap() JDK collector here is succinct (+1 here) .
Map newMap = givenMap.
entrySet().
stream().collect(Collector.of
( ()-> new HashMap(),
(mutableMap,entryItem)-> mutableMap.put(entryItem.getKey(),Integer.parseInt(entryItem.getValue())),
(map1,map2)->{ map1.putAll(map2); return map1;}
));