code: public boolean setPage(int p) {
  		p--;
  		if( p < 0 ) {
  			return false;
  		}
  		if( p >= pages.size() ) {
  			return false;
  		}
  		pageIndex = p;
  		currentPage = null;
  		return true;
  	}
docs: Navigates to the specified page number with 0 being the first page.
  @param p the page number to navigate to
  @return true if the page was successfully navigated to