Top Description Fields Constructors Methods
org.apache.poi.ss.usermodel

public final Class CellValue

extends Object
Class Inheritance
Imports
org.apache.poi.ss.formula.eval.ErrorEval

Mimics the 'data view' of a cell. This allows formula evaluator to return a CellValue instead of precasting the value to String or Number or boolean type.

Field Summary

Modifier and TypeField and Description
private final boolean
private final CellType
private final int
private final double
private final String
public static final CellValue
public static final CellValue

Constructor Summary

AccessConstructor and Description
private
CellValue(CellType cellType, double numberValue, boolean booleanValue, String textValue, int errorCode)

public
CellValue(double numberValue)

public
CellValue(String stringValue)

Method Summary

Modifier and TypeMethod and Description
public String
public boolean

Returns:

Returns the booleanValue.
getBooleanValue
()

public CellType

Returns:

the cell type
getCellType
()

Return the cell type.

public static CellValue
getError(int errorCode)

public byte

Returns:

Returns the errorValue.
getErrorValue
()

public double

Returns:

Returns the numberValue.
getNumberValue
()

public String

Returns:

Returns the stringValue.
getStringValue
()

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public static CellValue
valueOf(boolean booleanValue)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_booleanValueback to summary
private final boolean _booleanValue
_cellTypeback to summary
private final CellType _cellType
_errorCodeback to summary
private final int _errorCode
_numberValueback to summary
private final double _numberValue
_textValueback to summary
private final String _textValue
FALSEback to summary
public static final CellValue FALSE
TRUEback to summary
public static final CellValue TRUE

Constructor Detail

CellValueback to summary
private CellValue(CellType cellType, double numberValue, boolean booleanValue, String textValue, int errorCode)
CellValueback to summary
public CellValue(double numberValue)
CellValueback to summary
public CellValue(String stringValue)

Method Detail

formatAsStringback to summary
public String formatAsString()
getBooleanValueback to summary
public boolean getBooleanValue()
Returns:boolean

Returns the booleanValue.

getCellTypeback to summary
public CellType getCellType()

Return the cell type.

Returns:CellType

the cell type

getErrorback to summary
public static CellValue getError(int errorCode)
getErrorValueback to summary
public byte getErrorValue()
Returns:byte

Returns the errorValue.

getNumberValueback to summary
public double getNumberValue()
Returns:double

Returns the numberValue.

getStringValueback to summary
public String getStringValue()
Returns:String

Returns the stringValue.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

valueOfback to summary
public static CellValue valueOf(boolean booleanValue)