public class PageUtils implements java.io.Serializable
{
public PageUtils()
{
}
public static List getLimitedList(List origs, int page, int pageSite)
{
if(origs!=null&&origs.size()>0){
int total = origs.size();
int first = (page - 1) * pageSite;
int last = first + pageSite;
if(first < 0)
first = 0;
if(last > total)
last = total;
if(first > total)
return new ArrayList();
else
return origs.subList(first, last);
}else{
return null;
}
}
}