java泛型的使用,子类的泛型,可以通过父类来接收
public static List<BaseEntity> getPageList(List<? extends BaseEntity> childList){
Integer pageNum = 0;
Integer pageSize = 2;
List<BaseEntity> baseList = new ArrayList<BaseEntity>();
for(BaseEntity base : childList){
baseList.add(base);
}
return baseList.subList(pageNum*pageSize,(pageNum+1)*pageSize);
}