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

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