I have a Map the String key is nothing but numeric value like \"123\" etc. I\'m getting numeric value because this values are
Map
String
Answer using Java 8 and jOOλ
private static Map mapKeys(Map map, Function keyMapper) { return Seq.seq(map).map(t -> t.map1(keyMapper)).toMap(Tuple2::v1, Tuple2::v2); }