public boolean hasPrevious() { return currentPageIndex > 1 && currentPageIndex <= pageCount(); }
public boolean hasNext() { return currentPageIndex < pageCount(); }
/** * Sets an index of a current page. This method will make a quick count query to check that * the index you are setting is within the boundaries. * * @param currentPageIndex index of a current page. * @param skipCheck <code>true</code> to skip the upper boundary check (will not make a call to DB). */ public void setCurrentPageIndex(int currentPageIndex, boolean skipCheck){ if( currentPageIndex < 1){ throw new IndexOutOfBoundsException("currentPageIndex cannot be < 1"); } if(!skipCheck){ if(currentPageIndex > pageCount()){ throw new IndexOutOfBoundsException("currentPageIndex it outside of record set boundaries. "); } } this.currentPageIndex = currentPageIndex; }
public boolean hasNext() { return currentPageIndex < pageCount(); }
public boolean hasPrevious() { return currentPageIndex > 1 && currentPageIndex <= pageCount(); }
public boolean hasPrevious(){ return currentPage > 1 && currentPage <= pageCount(); }
public boolean hasNext(){ return currentPage < pageCount(); }
/** * Sets an index of a current page. This method will make a quick count query to check that * the index you are setting is within the boundaries. * * @param currentPageIndex index of a current page. * @param skipCheck <code>true</code> to skip the upper boundary check (will not make a call to DB). */ public void setCurrentPageIndex(int currentPageIndex, boolean skipCheck){ if( currentPageIndex < 1){ throw new IndexOutOfBoundsException("currentPageIndex cannot be < 1"); } if(!skipCheck){ if(currentPageIndex > pageCount()){ throw new IndexOutOfBoundsException("currentPageIndex it outside of record set boundaries. "); } } this.currentPageIndex = currentPageIndex; }