Basically I look for a way to avoid working with
entry -> entry.getValue
and
entry -> entry.getKey
Using guavas Maps.transformEntries:
Map m = new HashMap<>(); m.put("foo", 5); m.put("bar", 7); m.put("baz", 42); Map newMapView = Maps.transformEntries(m, (k, v) -> k + ":" + v);