Package org.apache.poi.hssf.record
Class FormulaSpecialCachedValue
- java.lang.Object
-
- org.apache.poi.hssf.record.FormulaSpecialCachedValue
-
- All Implemented Interfaces:
GenericRecord
@Internal public final class FormulaSpecialCachedValue extends Object implements GenericRecord
Manages the cached formula result values of other types besides numeric. Excel encodes the same 8 bytes that would be field_4_value with various NaN values that are decoded/encoded by this class.
-
-
Field Summary
Fields Modifier and Type Field Description static int
BOOLEAN
static int
EMPTY
static int
ERROR_CODE
static int
STRING
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static FormulaSpecialCachedValue
create(long valueLongBits)
static FormulaSpecialCachedValue
createCachedBoolean(boolean b)
static FormulaSpecialCachedValue
createCachedEmptyValue()
static FormulaSpecialCachedValue
createCachedErrorCode(int errorCode)
static FormulaSpecialCachedValue
createForString()
String
formatDebugString()
boolean
getBooleanValue()
int
getErrorValue()
Map<String,Supplier<?>>
getGenericProperties()
int
getTypeCode()
int
getValueType()
Deprecated.POI 5.0.0, will be removed in 5.0, use getValueTypeEnum until switch to enum is fully doneCellType
getValueTypeEnum()
Returns the type of the cached valuevoid
serialize(LittleEndianOutput out)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren, getGenericRecordType
-
-
-
-
Field Detail
-
STRING
public static final int STRING
- See Also:
- Constant Field Values
-
BOOLEAN
public static final int BOOLEAN
- See Also:
- Constant Field Values
-
ERROR_CODE
public static final int ERROR_CODE
- See Also:
- Constant Field Values
-
EMPTY
public static final int EMPTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTypeCode
public int getTypeCode()
-
create
public static FormulaSpecialCachedValue create(long valueLongBits)
- Returns:
null
if the double value encoded byvalueLongBits
is a normal (non NaN) double value.
-
serialize
public void serialize(LittleEndianOutput out)
-
formatDebugString
public String formatDebugString()
-
createCachedEmptyValue
public static FormulaSpecialCachedValue createCachedEmptyValue()
-
createForString
public static FormulaSpecialCachedValue createForString()
-
createCachedBoolean
public static FormulaSpecialCachedValue createCachedBoolean(boolean b)
-
createCachedErrorCode
public static FormulaSpecialCachedValue createCachedErrorCode(int errorCode)
-
getValueType
@Deprecated public int getValueType()
Deprecated.POI 5.0.0, will be removed in 5.0, use getValueTypeEnum until switch to enum is fully done
-
getValueTypeEnum
public CellType getValueTypeEnum()
Returns the type of the cached value- Returns:
- A CellType
- Since:
- POI 5.0.0
-
getBooleanValue
public boolean getBooleanValue()
-
getErrorValue
public int getErrorValue()
-
getGenericProperties
public Map<String,Supplier<?>> getGenericProperties()
- Specified by:
getGenericProperties
in interfaceGenericRecord
-
-