把下面两个方法的代码改写如下:
public int getFirstIndexForCurrentPage() {
return (this.currentPage - 1) * this.pageSize;
}
/**
* Returns the index into the master list of the last object that should appear on the current page that the user is
* viewing.
* @return int
*/
protected int getLastIndexForCurrentPage() {
if (this.partialList) {
return (getFirstIndexForCurrentPage()) +
Math.min(this.pageSize - 1, this.fullList.size() - 1);
} else {
return getLastIndexForPage(this.currentPage);
}
}