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
This commit is contained in:
Javen O'Neal 2016-07-04 12:35:49 +00:00
parent 268c5deeb2
commit 03671fea80
11 changed files with 95 additions and 38 deletions

View File

@ -455,7 +455,9 @@ public class HSSFCell implements Cell {
/** /**
* get the cells type (numeric, formula or string) * get the cells type (numeric, formula or string)
* @since POI 3.15 beta 3
* @deprecated 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 @Internal
@Override @Override
@ -1163,7 +1165,9 @@ public class HSSFCell implements Cell {
* @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING}, * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
* {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending * {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
* on the cached value of the formula * on the cached value of the formula
* @since POI 3.15 beta 3
* @deprecated 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 @Internal
@Override @Override

View File

@ -60,7 +60,11 @@ final class HSSFEvaluationCell implements EvaluationCell {
public int getCellType() { public int getCellType() {
return _cell.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 @Internal
@Override @Override
public CellType getCellTypeEnum() { public CellType getCellTypeEnum() {
@ -100,7 +104,11 @@ final class HSSFEvaluationCell implements EvaluationCell {
public int getCachedFormulaResultType() { public int getCachedFormulaResultType() {
return _cell.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 @Internal
@Override @Override
public CellType getCachedFormulaResultTypeEnum() { public CellType getCachedFormulaResultTypeEnum() {

View File

@ -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 * 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 * cell remains as a formula cell. If the cell does not contain formula, this method returns -1
* and leaves the cell unchanged. * and leaves the cell unchanged.
* *
* Note that the type of the <em>formula result</em> is returned, so you know what kind of * 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. * cached formula result is also stored with the formula.
* <pre> * <pre>
* int evaluatedCellType = evaluator.evaluateFormulaCell(cell); * int evaluatedCellType = evaluator.evaluateFormulaCell(cell);
* </pre> * </pre>
* Be aware that your cell will hold both the formula, and the result. If you want the cell * 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)} * replaced with the result of the formula, use {@link #evaluateInCell(org.apache.poi.ss.usermodel.Cell)}
* @param cell The cell to evaluate * @param cell The cell to evaluate
* @return -1 for non-formula cells, or the type of the <em>formula result</em> * @return -1 for non-formula cells, or the type of the <em>formula result</em>
* @deprecated 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 @Internal
@Override @Override
public CellType evaluateFormulaCellEnum(Cell cell) { public CellType evaluateFormulaCellEnum(Cell cell) {
if (cell == null || cell.getCellTypeEnum() != CellType.FORMULA) { if (cell == null || cell.getCellTypeEnum() != CellType.FORMULA) {
return CellType._UNINITIALIZED; return CellType._UNINITIALIZED;
} }
CellValue cv = evaluateFormulaCellValue(cell); CellValue cv = evaluateFormulaCellValue(cell);
// cell remains a formula cell, but the cached value is changed // cell remains a formula cell, but the cached value is changed
setCellValue(cell, cv); setCellValue(cell, cv);
return cv.getCellType(); return cv.getCellType();
} }
/** /**
* If cell contains formula, it evaluates the formula, and * 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)}} * value computed for you, use {@link #evaluateFormulaCellEnum(Cell)}}
*/ */
@Override @Override
public HSSFCell evaluateInCell(Cell cell) { public HSSFCell evaluateInCell(Cell cell) {
if (cell == null) { if (cell == null) {
return null; return null;
} }

View File

@ -44,7 +44,11 @@ public interface EvaluationCell {
* @return cell type * @return cell type
*/ */
int getCellType(); 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(); CellType getCellTypeEnum();
double getNumericCellValue(); double getNumericCellValue();
@ -59,6 +63,10 @@ public interface EvaluationCell {
* @return cell type of cached formula result * @return cell type of cached formula result
*/ */
int getCachedFormulaResultType(); 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(); CellType getCachedFormulaResultTypeEnum();
} }

View File

@ -113,7 +113,11 @@ final class ForkedEvaluationCell implements EvaluationCell {
public int getCellType() { public int getCellType() {
return _cellType.getCode(); 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 @Internal
@Override @Override
public CellType getCellTypeEnum() { public CellType getCellTypeEnum() {
@ -161,7 +165,11 @@ final class ForkedEvaluationCell implements EvaluationCell {
public int getCachedFormulaResultType() { public int getCachedFormulaResultType() {
return _masterCell.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 @Internal
@Override @Override
public CellType getCachedFormulaResultTypeEnum() { public CellType getCachedFormulaResultTypeEnum() {

View File

@ -166,7 +166,9 @@ public interface Cell {
* Return the cell type. * Return the cell type.
* *
* @return the cell type * @return the cell type
* @since POI 3.15 beta 3
* @deprecated 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 @Internal
CellType getCellTypeEnum(); CellType getCellTypeEnum();
@ -188,7 +190,9 @@ public interface Cell {
* @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING}, * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
* {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending * {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
* on the cached value of the formula * on the cached value of the formula
* @since POI 3.15 beta 3
* @deprecated 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 @Internal
CellType getCachedFormulaResultTypeEnum(); CellType getCachedFormulaResultTypeEnum();

View File

@ -128,6 +128,7 @@ public class SXSSFCell implements Cell {
* @see CellType#BOOLEAN * @see CellType#BOOLEAN
* @see CellType#ERROR * @see CellType#ERROR
* @deprecated POI 3.15 beta 3. Use {@link #setCellType(CellType)} instead. * @deprecated POI 3.15 beta 3. Use {@link #setCellType(CellType)} instead.
* Will be deleted when we make the CellType enum transition. See bug 59791.
*/ */
@Override @Override
public void setCellType(int cellType) public void setCellType(int cellType)
@ -160,7 +161,9 @@ public class SXSSFCell implements Cell {
* Return the cell type. * Return the cell type.
* *
* @return the cell type * @return the cell type
* @since POI 3.15 beta 3
* @deprecated 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 @Internal
@Override @Override
@ -186,7 +189,9 @@ public class SXSSFCell implements Cell {
* @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING}, * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
* {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending * {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
* on the cached value of the formula * on the cached value of the formula
* @since POI 3.15 beta 3
* @deprecated 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 @Internal
@Override @Override

View File

@ -62,7 +62,11 @@ final class SXSSFEvaluationCell implements EvaluationCell {
public int getCellType() { public int getCellType() {
return _cell.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 @Internal
@Override @Override
public CellType getCellTypeEnum() { public CellType getCellTypeEnum() {
@ -102,7 +106,11 @@ final class SXSSFEvaluationCell implements EvaluationCell {
public int getCachedFormulaResultType() { public int getCachedFormulaResultType() {
return _cell.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 @Internal
@Override @Override
public CellType getCachedFormulaResultTypeEnum() { public CellType getCachedFormulaResultTypeEnum() {

View File

@ -127,7 +127,7 @@ public abstract class BaseXSSFFormulaEvaluator implements FormulaEvaluator, Work
* so you know what kind of value is also stored with * so you know what kind of value is also stored with
* the formula. * the formula.
* <pre> * <pre>
* int evaluatedCellType = evaluator.evaluateFormulaCell(cell); * CellType evaluatedCellType = evaluator.evaluateFormulaCellEnum(cell);
* </pre> * </pre>
* Be aware that your cell will hold both the formula, * Be aware that your cell will hold both the formula,
* and the result. If you want the cell replaced with * and the result. If you want the cell replaced with

View File

@ -678,7 +678,9 @@ public final class XSSFCell implements Cell {
* Return the cell type. * Return the cell type.
* *
* @return the cell type * @return the cell type
* @since POI 3.15 beta 3
* @deprecated 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 @Internal
@Override @Override
@ -708,7 +710,9 @@ public final class XSSFCell implements Cell {
* @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING}, * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
* {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending * {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
* on the cached value of the formula * on the cached value of the formula
* @since POI 3.15 beta 3
* @deprecated 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 @Internal
@Override @Override

View File

@ -63,7 +63,11 @@ final class XSSFEvaluationCell implements EvaluationCell {
public int getCellType() { public int getCellType() {
return _cell.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 @Internal
@Override @Override
public CellType getCellTypeEnum() { public CellType getCellTypeEnum() {
@ -103,7 +107,11 @@ final class XSSFEvaluationCell implements EvaluationCell {
public int getCachedFormulaResultType() { public int getCachedFormulaResultType() {
return _cell.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 @Internal
@Override @Override
public CellType getCachedFormulaResultTypeEnum() { public CellType getCachedFormulaResultTypeEnum() {