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

 boolean isContain = list.stream().anyMatch(item -> item.getKey().equals(key));
原文地址:https://www.cnblogs.com/haoxianrui/p/14922335.html