aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2016-07-04 12:35:49 +0000
committerJaven O'Neal <onealj@apache.org>2016-07-04 12:35:49 +0000
commita6cd0dd6f4b677605105dc93fc3b6fa7a83c1fd4 (patch)
treee883f55bf3da2186ed79188bc3bbd1942ddd4083 /src/java
parent04be2bb235391eaf43e0a682a9923bc9e8b3755a (diff)
downloadpoi-a6cd0dd6f4b677605105dc93fc3b6fa7a83c1fd4.tar.gz
poi-a6cd0dd6f4b677605105dc93fc3b6fa7a83c1fd4.zip
bug 59791: add @since to Cell, EvaluationCell, and FormulaEvaluator CellType getter javadocs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751264 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFCell.java4
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java12
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java54
-rw-r--r--src/java/org/apache/poi/ss/formula/EvaluationCell.java12
-rw-r--r--src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java12
-rw-r--r--src/java/org/apache/poi/ss/usermodel/Cell.java4
6 files changed, 65 insertions, 33 deletions
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
index 314612fa68..6974360a7a 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
@@ -455,7 +455,9 @@ public class HSSFCell implements Cell {
/**
* get the cells type (numeric, formula or string)
+ * @since POI 3.15 beta 3
* @deprecated POI 3.15 beta 3
+ * Will be deleted when we make the CellType enum transition. See bug 59791.
*/
@Internal
@Override
@@ -1163,7 +1165,9 @@ public class HSSFCell implements Cell {
* @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
* {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
* on the cached value of the formula
+ * @since POI 3.15 beta 3
* @deprecated POI 3.15 beta 3
+ * Will be deleted when we make the CellType enum transition. See bug 59791.
*/
@Internal
@Override
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java b/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java
index 6cb3f2b6f4..808655a539 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java
@@ -60,7 +60,11 @@ final class HSSFEvaluationCell implements EvaluationCell {
public int getCellType() {
return _cell.getCellType();
}
- /** @deprecated POI 3.15 beta 3 */
+ /**
+ * @since POI 3.15 beta 3
+ * @deprecated POI 3.15 beta 3.
+ * Will be deleted when we make the CellType enum transition. See bug 59791.
+ */
@Internal
@Override
public CellType getCellTypeEnum() {
@@ -100,7 +104,11 @@ final class HSSFEvaluationCell implements EvaluationCell {
public int getCachedFormulaResultType() {
return _cell.getCachedFormulaResultType();
}
- /** @deprecated POI 3.15 beta 3 */
+ /**
+ * @since POI 3.15 beta 3
+ * @deprecated POI 3.15 beta 3.
+ * Will be deleted when we make the CellType enum transition. See bug 59791.
+ */
@Internal
@Override
public CellType getCachedFormulaResultTypeEnum() {
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java b/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java
index 1da6a39323..139df673da 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java
@@ -219,32 +219,32 @@ public class HSSFFormulaEvaluator implements FormulaEvaluator, WorkbookEvaluator
}
/**
- * If cell contains formula, it evaluates the formula, and saves the result of the formula. The
- * cell remains as a formula cell. If the cell does not contain formula, this method returns -1
- * and leaves the cell unchanged.
- *
- * Note that the type of the <em>formula result</em> is returned, so you know what kind of
- * cached formula result is also stored with the formula.
- * <pre>
- * int evaluatedCellType = evaluator.evaluateFormulaCell(cell);
- * </pre>
- * Be aware that your cell will hold both the formula, and the result. If you want the cell
- * replaced with the result of the formula, use {@link #evaluateInCell(org.apache.poi.ss.usermodel.Cell)}
- * @param cell The cell to evaluate
- * @return -1 for non-formula cells, or the type of the <em>formula result</em>
- * @deprecated POI 3.15 beta 3
- */
- @Internal
- @Override
- public CellType evaluateFormulaCellEnum(Cell cell) {
- if (cell == null || cell.getCellTypeEnum() != CellType.FORMULA) {
- return CellType._UNINITIALIZED;
- }
- CellValue cv = evaluateFormulaCellValue(cell);
- // cell remains a formula cell, but the cached value is changed
- setCellValue(cell, cv);
- return cv.getCellType();
- }
+ * If cell contains formula, it evaluates the formula, and saves the result of the formula. The
+ * cell remains as a formula cell. If the cell does not contain formula, this method returns -1
+ * and leaves the cell unchanged.
+ *
+ * Note that the type of the <em>formula result</em> is returned, so you know what kind of
+ * cached formula result is also stored with the formula.
+ * <pre>
+ * int evaluatedCellType = evaluator.evaluateFormulaCell(cell);
+ * </pre>
+ * Be aware that your cell will hold both the formula, and the result. If you want the cell
+ * replaced with the result of the formula, use {@link #evaluateInCell(org.apache.poi.ss.usermodel.Cell)}
+ * @param cell The cell to evaluate
+ * @return -1 for non-formula cells, or the type of the <em>formula result</em>
+ * @deprecated POI 3.15 beta 3. Will be deleted when we make the CellType enum transition. See bug 59791.
+ */
+ @Internal
+ @Override
+ public CellType evaluateFormulaCellEnum(Cell cell) {
+ if (cell == null || cell.getCellTypeEnum() != CellType.FORMULA) {
+ return CellType._UNINITIALIZED;
+ }
+ CellValue cv = evaluateFormulaCellValue(cell);
+ // cell remains a formula cell, but the cached value is changed
+ setCellValue(cell, cv);
+ return cv.getCellType();
+ }
/**
* If cell contains formula, it evaluates the formula, and
@@ -262,7 +262,7 @@ public class HSSFFormulaEvaluator implements FormulaEvaluator, WorkbookEvaluator
* value computed for you, use {@link #evaluateFormulaCellEnum(Cell)}}
*/
@Override
- public HSSFCell evaluateInCell(Cell cell) {
+ public HSSFCell evaluateInCell(Cell cell) {
if (cell == null) {
return null;
}
diff --git a/src/java/org/apache/poi/ss/formula/EvaluationCell.java b/src/java/org/apache/poi/ss/formula/EvaluationCell.java
index e4378a4df0..3695fe2802 100644
--- a/src/java/org/apache/poi/ss/formula/EvaluationCell.java
+++ b/src/java/org/apache/poi/ss/formula/EvaluationCell.java
@@ -44,7 +44,11 @@ public interface EvaluationCell {
* @return cell type
*/
int getCellType();
- /** @deprecated POI 3.15 beta 3 */
+ /**
+ * @since POI 3.15 beta 3
+ * @deprecated POI 3.15 beta 3.
+ * Will be deleted when we make the CellType enum transition. See bug 59791.
+ */
CellType getCellTypeEnum();
double getNumericCellValue();
@@ -59,6 +63,10 @@ public interface EvaluationCell {
* @return cell type of cached formula result
*/
int getCachedFormulaResultType();
- /** @deprecated POI 3.15 beta 3 */
+ /**
+ * @since POI 3.15 beta 3
+ * @deprecated POI 3.15 beta 3.
+ * Will be deleted when we make the CellType enum transition. See bug 59791.
+ */
CellType getCachedFormulaResultTypeEnum();
}
diff --git a/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java b/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java
index 8149774142..d961439a35 100644
--- a/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java
+++ b/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java
@@ -113,7 +113,11 @@ final class ForkedEvaluationCell implements EvaluationCell {
public int getCellType() {
return _cellType.getCode();
}
- /** @deprecated POI 3.15 beta 3 */
+ /**
+ * @since POI 3.15 beta 3
+ * @deprecated POI 3.15 beta 3.
+ * Will be deleted when we make the CellType enum transition. See bug 59791.
+ */
@Internal
@Override
public CellType getCellTypeEnum() {
@@ -161,7 +165,11 @@ final class ForkedEvaluationCell implements EvaluationCell {
public int getCachedFormulaResultType() {
return _masterCell.getCachedFormulaResultType();
}
- /** @deprecated POI 3.15 beta 3. */
+ /**
+ * @since POI 3.15 beta 3
+ * @deprecated POI 3.15 beta 3.
+ * Will be deleted when we make the CellType enum transition. See bug 59791.
+ */
@Internal
@Override
public CellType getCachedFormulaResultTypeEnum() {
diff --git a/src/java/org/apache/poi/ss/usermodel/Cell.java b/src/java/org/apache/poi/ss/usermodel/Cell.java
index c6421b3b47..68bc8f67e6 100644
--- a/src/java/org/apache/poi/ss/usermodel/Cell.java
+++ b/src/java/org/apache/poi/ss/usermodel/Cell.java
@@ -166,7 +166,9 @@ public interface Cell {
* Return the cell type.
*
* @return the cell type
+ * @since POI 3.15 beta 3
* @deprecated POI 3.15 beta 3
+ * Will be deleted when we make the CellType enum transition. See bug 59791.
*/
@Internal
CellType getCellTypeEnum();
@@ -188,7 +190,9 @@ public interface Cell {
* @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
* {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
* on the cached value of the formula
+ * @since POI 3.15 beta 3
* @deprecated POI 3.15 beta 3
+ * Will be deleted when we make the CellType enum transition. See bug 59791.
*/
@Internal
CellType getCachedFormulaResultTypeEnum();