Map<String, String> result = map.entrySet().stream()
.collect(Collectors.toMap(xxx));
例子:Map<String,List> 转化为 Map<String,Integer> ,其中Integer是原来list的size
Map<String, Integer> result = map.entrySet().stream()
.collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().size())));