list 去重并保持原来排序
public <T> List<T> removeDuplicateKeepOrder(List<T> list){
/* Set set = new HashSet();
List<T> newList = new ArrayList<T>();
for (T element : list) {
if (set.add(element)) newList.add(element);
}
//list.clear();
//list.addAll(newList);
//return list;
return newList;*/
return new ArrayList<T>(new LinkedHashSet<T>(list));
}