]> source.dussan.org Git - poi.git/commitdiff
Tweak method signature to match changes done in trunk
authorNick Burch <nick@apache.org>
Sat, 8 Mar 2008 15:38:29 +0000 (15:38 +0000)
committerNick Burch <nick@apache.org>
Sat, 8 Mar 2008 15:38:29 +0000 (15:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@634991 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Row.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java

index 54229a16abb0ca7955b9e14af87b1bfd5a59857c..712dcc99c5e305c633728d52e43022d49dfb13ac 100644 (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];
     }
 
     /**
index b0b12cd25d572936ace123991b9f047b550d4b71..012ee81d04db0a788e0b828a13116ed8497cc903 100644 (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();
 
     /**
index fc372de585f8783bf1289d69b490a5b2ad69ac31..dba418864984cb6d67285ce733f2b7bda6ec6ffe 100644 (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();