Tweak method signature to match changes done in trunk

git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@634991 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2008-03-08 15:38:29 +00:00
parent 913a1ad96e
commit d75ecc0512
3 changed files with 20 additions and 9 deletions

View File

@ -299,17 +299,30 @@ public class HSSFRow
}
/**
* get the hssfcell representing a given column (logical cell) 0-based. If you
* ask for a cell that is not defined....you get a null.
* Get the hssfcell representing a given column (logical cell)
* 0-based. If you ask for a cell that is not defined....
* you get a null.
* Short method signature provided to retain binary
* compatibility.
*
* @param cellnum 0 based column number
* @return HSSFCell representing that column or null if undefined.
*/
public HSSFCell getCell(short cellnum)
{
if(cellnum<0||cellnum>=cells.length) return null;
return cells[cellnum];
return getCell((int)cellnum);
}
/**
* Get the hssfcell representing a given column (logical cell)
* 0-based. If you ask for a cell that is not defined....
* you get a null.
*
* @param cellnum 0 based column number
* @return HSSFCell representing that column or null if undefined.
*/
public HSSFCell getCell(int cellnum) {
if(cellnum<0||cellnum>=cells.length) return null;
return cells[cellnum];
}
/**

View File

@ -79,14 +79,12 @@ public interface Row extends Iterable {
* @param cellnum 0 based column number
* @return HSSFCell representing that column or null if undefined.
*/
Cell getCell(short cellnum);
Cell getCell(int cellnum);
/**
* get the number of the first cell contained in this row.
* @return short representing the first logical cell in the row, or -1 if the row does not contain any cells.
*/
short getFirstCellNum();
/**

View File

@ -122,7 +122,7 @@ public class XSSFRow implements Row {
return xcell;
}
public Cell getCell(short cellnum) {
public Cell getCell(int cellnum) {
Iterator<Cell> it = cellIterator();
for ( ; it.hasNext() ; ) {
Cell cell = it.next();