public Map parseMapForFilters(Map map, String filter1,String filter2) {
if (map == null) {
return null;
} else {
map = map.entrySet().stream()
.filter(e -> e.getKey().contains(filter1) || e.getKey().contains(filter2))
.collect(Collectors.toMap(
(e) -> (String) e.getKey(),
Map.Entry::getValue
));
}
return map;
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)