boolean isContain = list.stream().anyMatch(item -> item.getKey().equals(key));
JAVA根据集合中属性判断是否包含元素
原创
©著作权归作者所有:来自51CTO博客作者有来技术的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
java检测字符串是否包含数字和字母
java检测字符串是否包含数字和字母的方法。
git 字符串 System java -
教你如何判断Java代码中异步操作是否完成
本篇文章将介绍几种常见的方法来判断Java代码中异步操作是否完成。
java 异步任务 异步操作