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 intBOOLEANstatic intEMPTYstatic intERROR_CODEstatic intSTRING
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static FormulaSpecialCachedValuecreate(long valueLongBits)static FormulaSpecialCachedValuecreateCachedBoolean(boolean b)static FormulaSpecialCachedValuecreateCachedEmptyValue()static FormulaSpecialCachedValuecreateCachedErrorCode(int errorCode)static FormulaSpecialCachedValuecreateForString()StringformatDebugString()booleangetBooleanValue()intgetErrorValue()Map<String,Supplier<?>>getGenericProperties()intgetTypeCode()intgetValueType()Deprecated.POI 5.0.0, will be removed in 5.0, use getValueTypeEnum until switch to enum is fully doneCellTypegetValueTypeEnum()Returns the type of the cached valuevoidserialize(LittleEndianOutput out)StringtoString()-
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:
nullif the double value encoded byvalueLongBitsis 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:
getGenericPropertiesin interfaceGenericRecord
-
-