code: public int getLastRowForPage() {
          int row = getRow();
          if(_dataSetSize != null) {
              if(_dataSetSize.intValue() - row < getPageSize())
                  return row + (_dataSetSize.intValue() - row) - 1;
              else return row + getPageSize() - 1;
          }
          else return row + getPageSize() - 1;
      }
docs: <p>
  Get the last row for the current page of data.  This value is useful when displaying paging UI like:
  <pre>
  Row 11 through 20 of 60
  </pre>
  The last row on the page is returned as a zero-based number from the beginning of the data set.  In the
  case above, the value returned is <code>19</code> and is converted to <code>20</code> for readability
  by adding one.  If the current page is only partially filled, this method will return the value for a partial page.
  For example, with a data set of size 4 on a page of size 10, the value <code>3</code> would be returned.
  </p>
  @return the last row for the current page