I have a Map
the String
key is nothing but numeric value like \"123\" etc. I\'m getting numeric value because this values are
Here's an updated version of one of the answers below to make the resulting Map unmodifiable (no, it's not using Guava, just plain Java 8):
import static java.util.stream.Collectors.collectingAndThen;
import static java.util.stream.Collectors.toMap;
...
newMap = oldMap.entrySet().stream().collect(collectingAndThen(
toMap((Map.Entry entry) -> transformKey(entry.getKey()),
(Map.Entry entry) -> transformValue(entry.getValue())),
Collections::unmodifiableMap)));