`
txhyhhylf521
  • 浏览: 41710 次
  • 性别: Icon_minigender_2
  • 来自: 深圳
文章分类
社区版块
存档分类

集合操作的利器:CollectionUtils

 
阅读更多

使用CollectionUtils的Predicate来过滤一个集合list中某种class的子集合

CollectionUtils.filter(this.list, new Predicate(){
	public boolean evaluate(Object object) {
		if(object instanceof TSysDepartment){//TSysDepartment为要过滤的对象
			return false;
		}
		return true;
	}
});

  

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics