Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Map<String, Object> oldMap = new HashMap<>();
- Function<Object, Integer> mapper = o -> (Integer) o;
- Map<String, Integer> newMap = oldMap.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, o -> mapper.apply(o.getValue())));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement