---
title: "去重复记录"
author: "rainyear"
date: "2011-08-22T15:38:03Z"
tags: []
categories: ["非技术"]
slug: "untitled"
draft: false
lastmod: "2011-08-22T15:55:23Z"
id: 1155040
url: "https://rainyear.iteye.com/blog/1155040"
---

Set<Category>tempSet=new HashSet<Category>(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);
		}
	}