/*
* author:wsx
*/
public List<TSDepart> getSubStringByRadom(List<TSDepart> list, int count){
List backList = null;
backList = new ArrayList<TSDepart>();
Random random = new Random();
int backSum = 0;
if (list.size() >= count) {
backSum = count;
}else {
backSum = list.size();
}
for (int i = 0; i < backSum; i++) {
// 随机数的范围为0-list.size()-1
int target = random.nextInt(list.size());
backList.add(list.get(target));
list.remove(target);
}
return backList;
}