标签:
// 分页
public List<String> doPagination(int pagesize,int index,List<String> list){
List<String> list2 = new ArrayList<String>();
try {
int i = pagesize * (index - 1);
while (i < pagesize * index) {
if (i <= (list.size() - 1)) {
String dto = (String) list.get(i);
list2.add(dto);
} else {
break;
}
i++;
}
} catch (Exception e) {
// TODO: handle exception
}
return list2;
}
标签:
原文地址:http://www.cnblogs.com/xiaohaizhuimeng/p/5648131.html