举例,将map的首字母小写 HashMap<String, String> posNoticesMap = new HashMap<>(); posNoticesMap.put("SDSD","sdsad"); Map<String, String> newMap = posNoticesMap.entrySet().stream().collect(Collectors.toMap(entry -> StringUtils.uncapitalize(entry.getKey()), entry -> entry.getValue()));
map 里面的key值的改变
最新推荐文章于 2023-05-13 19:29:51 发布