/** * Checks that a cell is a valid cell in the table. * * @param row the cell's row * @param column the cell's column * @throws IndexOutOfBoundsException */ @Override protected void prepareCell(int row, int column) { // Ensure that the indices are not negative. prepareRow(row); if (column < 0) { throw new IndexOutOfBoundsException( "Cannot access a column with a negative index: " + column); } if (column >= numColumns) { throw new IndexOutOfBoundsException("Column index: " + column + ", Column size: " + numColumns); } }
/** * Checks that a cell is a valid cell in the table. * * @param row the cell's row * @param column the cell's column * @throws IndexOutOfBoundsException */ @Override protected void prepareCell(int row, int column) { // Ensure that the indices are not negative. prepareRow(row); if (column < 0) { throw new IndexOutOfBoundsException( "Cannot access a column with a negative index: " + column); } if (column >= numColumns) { throw new IndexOutOfBoundsException("Column index: " + column + ", Column size: " + numColumns); } }
/** * Checks that a cell is a valid cell in the table. * * @param row the cell's row * @param column the cell's column * @throws IndexOutOfBoundsException */ @Override protected void prepareCell(int row, int column) { // Ensure that the indices are not negative. prepareRow(row); if (column < 0) { throw new IndexOutOfBoundsException( "Cannot access a column with a negative index: " + column); } if (column >= numColumns) { throw new IndexOutOfBoundsException("Column index: " + column + ", Column size: " + numColumns); } }