map = map.entrySet().stream() .filter(u -> u.getValue() != 0).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
Map使用stream小记
最新推荐文章于 2024-09-03 20:52:29 发布
map = map.entrySet().stream() .filter(u -> u.getValue() != 0).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));