Esempio n. 1
0
 @Override
 public List<E> next() {
   if (!this.hasNext()) {
     throw new NoSuchElementException("There are no more pages to iterate over");
   }
   List<E> itemsInPage = target.getPage(currentPage + 1);
   currentPage++;
   currentListCount += pageSize;
   return itemsInPage;
 }
Esempio n. 2
0
 PagedListIterator(final PagedList<E> target) {
   this.target = target;
   size = target.getSize();
   pageSize = target.getPageSize();
 }