Top Description Fields Constructors Methods
org.apache.poi.hssf.record

public final Class FormulaSpecialCachedValue

extends Object
implements GenericRecord
Class Inheritance
All Implemented Interfaces
org.apache.poi.common.usermodel.GenericRecord
Annotations
@Internal
Static Imports
org.apache.poi.util.GenericRecordUtil.getEnumBitsAsString

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

Modifier and TypeField and Description
private final byte[]
private static final long
BIT_MARKER

deliberately chosen by Excel in order to encode other values within Double NaNs

public static final int
private static final int
public static final int
public static final int
public static final int
private static final int

Constructor Summary

AccessConstructor and Description
pack-priv
private

Method Summary

Modifier and TypeMethod and Description
public static FormulaSpecialCachedValue

Returns:

null if the double value encoded by valueLongBits is a normal (non NaN) double value.
create
(long valueLongBits)

private static FormulaSpecialCachedValue
create(int code, int data)

public static FormulaSpecialCachedValue
public static FormulaSpecialCachedValue
public static FormulaSpecialCachedValue
createCachedErrorCode(int errorCode)

public static FormulaSpecialCachedValue
public String
private String
public boolean
private int
public int
public Map<String, Supplier<?>>
private Object
public int
public int
getValueType()
Deprecated POI 5.0.0, will be removed in 5.0, use getValueTypeEnum until switch to enum is fully done

public CellType

Returns:

A CellType
getValueTypeEnum
()

Returns the type of the cached value

public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_variableDataback to summary
private final byte[] _variableData
BIT_MARKERback to summary
private static final long BIT_MARKER

deliberately chosen by Excel in order to encode other values within Double NaNs

BOOLEANback to summary
public static final int BOOLEAN
DATA_INDEXback to summary
private static final int DATA_INDEX
EMPTYback to summary
public static final int EMPTY
ERROR_CODEback to summary
public static final int ERROR_CODE
STRINGback to summary
public static final int STRING
VARIABLE_DATA_LENGTHback to summary
private static final int VARIABLE_DATA_LENGTH

Constructor Detail

FormulaSpecialCachedValueback to summary
pack-priv FormulaSpecialCachedValue(FormulaSpecialCachedValue other)
FormulaSpecialCachedValueback to summary
private FormulaSpecialCachedValue(byte[] data)

Method Detail

createback to summary
public static FormulaSpecialCachedValue create(long valueLongBits)
Returns:FormulaSpecialCachedValue

null if the double value encoded by valueLongBits is a normal (non NaN) double value.

createback to summary
private static FormulaSpecialCachedValue create(int code, int data)
createCachedBooleanback to summary
public static FormulaSpecialCachedValue createCachedBoolean(boolean b)
createCachedEmptyValueback to summary
public static FormulaSpecialCachedValue createCachedEmptyValue()
createCachedErrorCodeback to summary
public static FormulaSpecialCachedValue createCachedErrorCode(int errorCode)
createForStringback to summary
public static FormulaSpecialCachedValue createForString()
formatDebugStringback to summary
public String formatDebugString()
formatValueback to summary
private String formatValue()
getBooleanValueback to summary
public boolean getBooleanValue()
getDataValueback to summary
private int getDataValue()
getErrorValueback to summary
public int getErrorValue()
getGenericPropertiesback to summary
public Map<String, Supplier<?>> getGenericProperties()

Implements org.apache.poi.common.usermodel.GenericRecord.getGenericProperties.

Annotations
@Override
getGenericValueback to summary
private Object getGenericValue()
getTypeCodeback to summary
public int getTypeCode()
getValueTypeback to summary
public int getValueType()

Deprecated

POI 5.0.0, will be removed in 5.0, use getValueTypeEnum until switch to enum is fully done

Annotations
@Deprecated
getValueTypeEnumback to summary
public CellType getValueTypeEnum()

Returns the type of the cached value

Returns:CellType

A CellType

Since
POI 5.0.0
serializeback to summary
public void serialize(LittleEndianOutput out)
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

Annotations
@Override