You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2021/11/02 13:18:35 UTC

svn commit: r1894679 - in /poi/trunk/poi/src/main/java/org/apache/poi: hssf/usermodel/HSSFWorkbook.java ss/formula/EvaluationWorkbook.java

Author: centic
Date: Tue Nov  2 13:18:35 2021
New Revision: 1894679

URL: http://svn.apache.org/viewvc?rev=1894679&view=rev
Log:
Add some more JavaDoc

Modified:
    poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
    poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/EvaluationWorkbook.java

Modified: poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java?rev=1894679&r1=1894678&r2=1894679&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java Tue Nov  2 13:18:35 2021
@@ -247,7 +247,7 @@ public final class HSSFWorkbook extends
     public static int getMaxImageLength() {
         return MAX_IMAGE_LENGTH;
     }
-    
+
     /**
      * Creates new HSSFWorkbook from scratch (start here!)
      */
@@ -789,7 +789,7 @@ public final class HSSFWorkbook extends
      * Returns the index of the sheet by his name
      *
      * @param name the sheet name
-     * @return index of the sheet (0 based)
+     * @return index of the sheet (0 based) or -1 if it was not found.
      */
     @Override
     public int getSheetIndex(String name) {

Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/EvaluationWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/EvaluationWorkbook.java?rev=1894679&r1=1894678&r2=1894679&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/EvaluationWorkbook.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/EvaluationWorkbook.java Tue Nov  2 13:18:35 2021
@@ -29,27 +29,49 @@ import org.apache.poi.util.Internal;
  */
 @Internal
 public interface EvaluationWorkbook {
+
+	/**
+	 * Returns the name of the sheet at the given 0-based index.
+	 *
+	 * @param sheetIndex The 0-based index of the sheet
+	 * @return The name of the sheet
+	 * @throws IllegalArgumentException If the index is outside the indices of available sheets
+	 */
     String getSheetName(int sheetIndex);
+
     /**
      * @return -1 if the specified sheet is from a different book
      */
     int getSheetIndex(EvaluationSheet sheet);
+
     /**
      * Finds a sheet index by case insensitive name.
      * @return the index of the sheet matching the specified name.  -1 if not found
      */
     int getSheetIndex(String sheetName);
 
+	/**
+	 * Get the sheet identified by the given 0-based index.
+	 *
+	 * @param sheetIndex The 0-based index of the sheet
+	 * @return The sheet
+	 * @throws IllegalArgumentException If the index is outside the indices of available sheets
+	 */
     EvaluationSheet getSheet(int sheetIndex);
 
     /**
      * HSSF Only - fetch the external-style sheet details
      * <p>Return will have no workbook set if it's actually in our own workbook</p>
+	 * @return The found sheet or null if not found
+	 * @throws IllegalStateException If called with XSSF or SXSSF workbooks
      */
     ExternalSheet getExternalSheet(int externSheetIndex);
+
     /**
      * XSSF Only - fetch the external-style sheet details
      * <p>Return will have no workbook set if it's actually in our own workbook</p>
+	 * @return The found sheet
+	 * @throws IllegalStateException If called with HSSF workbooks
      */
     ExternalSheet getExternalSheet(String firstSheetName, String lastSheetName, int externalWorkbookNumber);
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org