ITeye博客

去重复记录

rainyear · 2011-08-22 15:38 · Java基础 · 非技术 · Markdown

SettempSet=new HashSet(baseCategoryList); Category temp=tempSet.toArray(new Category); baseCategoryList=Arrays.asList(temp); List baseList=new ArrayList();

public boolean equals(Object o) { AttributeItemBean s = (AttributeItemBean) o; if (s.getName().equals(name) && s.getAttrId().equals(attrId)) { return true; } else { return false; } }

public int hashCode() {
	int result = 17;
	result = 37 * result + name.hashCode();
	result = 37 * result + attrId.intValue();
	return result;
}



private void populateAvailableAttributeGroups(){
	availableAttributeGroups = new ArrayList<AttributeGroupBean>(allAttributeGroups);
	if(!selectedAttributeGroups.isEmpty()){
		availableAttributeGroups.removeAll(selectedAttributeGroups);
	}
}

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。