bug 59790,59791: add @since javadoc annotation to FormulaType and CellType

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751287 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2016-07-04 13:49:44 +00:00
parent 4f92e81892
commit a22b230394
2 changed files with 26 additions and 6 deletions

View File

@ -57,14 +57,19 @@ public enum FormulaType {
/** @deprecated POI 3.15 beta 3. */
private final int code;
/** @deprecated POI 3.15 beta 3.
/**
* @since POI 3.15 beta 3.
* @deprecated POI 3.15 beta 3.
* Formula type code doesn't mean anything. Only in this class for transitioning from a class with int constants to a true enum.
* Remove hard-coded numbers from the enums above. */
private FormulaType(int code) {
this.code = code;
}
/** @deprecated POI 3.15 beta 3. Used to transition code from <code>int</code>s to <code>FormulaType</code>s. */
/**
* @since POI 3.15 beta 3.
* @deprecated POI 3.15 beta 3. Used to transition code from <code>int</code>s to <code>FormulaType</code>s.
*/
public static FormulaType forInt(int code) {
for (FormulaType type : values()) {
if (type.code == code) {

View File

@ -20,6 +20,9 @@ package org.apache.poi.ss.usermodel;
import org.apache.poi.ss.formula.FormulaType;
import org.apache.poi.util.Internal;
/**
* @since POI 3.15 beta 3
*/
public enum CellType {
@Internal
_UNINITIALIZED(-1),
@ -52,15 +55,24 @@ public enum CellType {
*/
ERROR(5);
/** @deprecated POI 3.15 beta 3 */
/**
* @since POI 3.15 beta 3
* @deprecated POI 3.15 beta 3
*/
private final int code;
/** @deprecated POI 3.15 beta 3 */
/**
* @since POI 3.15 beta 3
* @deprecated POI 3.15 beta 3
*/
private CellType(int code) {
this.code = code;
}
/** @deprecated POI 3.15 beta 3. Used to transition code from <code>int</code>s to <code>CellType</code>s. */
/**
* @since POI 3.15 beta 3.
* @deprecated POI 3.15 beta 3. Used to transition code from <code>int</code>s to <code>CellType</code>s.
*/
public static CellType forInt(int code) {
for (CellType type : values()) {
if (type.code == code) {
@ -70,7 +82,10 @@ public enum CellType {
throw new IllegalArgumentException("Invalid CellType code: " + code);
}
/** @deprecated POI 3.15 beta 3 */
/**
* @since POI 3.15 beta 3
* @deprecated POI 3.15 beta 3
*/
public int getCode() {
return code;
}