public List removeDuplicate(List list) {
try {
TmsEmployeeAdvancedSearchBo tb;
TmsEmployeeAdvancedSearchBo tmp;
for (int i=0; i tb = new TmsEmployeeAdvancedSearchBo();
tb = list.get(i);
for (int j=list.size()-1; j>i; j--){
tmp=new TmsEmployeeAdvancedSearchBo();
tmp = list.get(j);
if (tb.getCodeSubscriber().equals(tmp.getCodeSubscriber()) &&
tb.getCodeUser().equals(tmp.getCodeUser())){
list.remove(j);
}
}
}
return list;
}catch(Exception e){
handleException(e);
}
return null;
}
try {
TmsEmployeeAdvancedSearchBo tb;
TmsEmployeeAdvancedSearchBo tmp;
for (int i=0; i tb = new TmsEmployeeAdvancedSearchBo();
tb = list.get(i);
for (int j=list.size()-1; j>i; j--){
tmp=new TmsEmployeeAdvancedSearchBo();
tmp = list.get(j);
if (tb.getCodeSubscriber().equals(tmp.getCodeSubscriber()) &&
tb.getCodeUser().equals(tmp.getCodeUser())){
list.remove(j);
}
}
}
return list;
}catch(Exception e){
handleException(e);
}
return null;
}
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/129556/viewspace-611432/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/129556/viewspace-611432/