JAVA根据集合中属性判断是否包含元素

 boolean isContain = list.stream().anyMatch(item -> item.getKey().equals(key));
posted @ 2021-06-23 13:30  有来技术  阅读(1231)  评论(1编辑  收藏  举报