标签:com new t ring system tree new for array treeset
//定义集合
TreeSet<ArrayList<String>>set = new TreeSet<ArrayList<String>>(new Comparator<ArrayList<String>>() {
public int compare(ArrayList<String> o1, ArrayList<String> o2) {
System.out.println("1+");
int flag = 0;
for (String temp: o1) {
if(!o2.contains(temp)){
flag =1;
break;
}
}
for (String temp: o2) {
if(!o1.contains(temp)){
flag =1;
break;
}
}
return flag;
}
});
TreeSet存放ArrayList并去重(去重:所有元素完全一致)
标签:com new t ring system tree new for array treeset
原文地址:http://www.cnblogs.com/wahy/p/6775248.html