Top Description Fields Constructors Methods
org.apache.poi.ss.formula.ptg

public final Class StringPtg

extends ScalarConstantPtg
Class Inheritance
Imports
java.util.Map, java.util.function.Supplier, org.apache.poi.util.GenericRecordUtil, .LittleEndianInput, .LittleEndianOutput, .StringUtil

String Stores a String value in a formula value stored in the format <length 2 bytes>char[]

Field Summary

Modifier and TypeField and Description
private final boolean
private final String
field_3_string

Note

OO doc says 16bit length, but BiffViewer says 8 Book says something totally different, so don't look there!

private static final char
FORMULA_DELIMITER

the character (") used in formulas to delimit string literals

public static final byte

Constructor Summary

AccessConstructor and Description
public
StringPtg(LittleEndianInput in)

Create a StringPtg from a stream

public
StringPtg(String
: String representation of a floating point number
value
)

Create a StringPtg from a string representation of the number Number format is not checked, it is expected to be validated in the parser that calls this method.

Method Summary

Modifier and TypeMethod and Description
public StringPtg
public Map<String, Supplier<?>>
public byte
public int
public String
public String
toFormulaString()

Implements abstract org.apache.poi.ss.formula.ptg.Ptg.toFormulaString.

return a string representation of this token alone

public void
Inherited from org.apache.poi.ss.formula.ptg.ScalarConstantPtg:
getDefaultOperandClassisBaseToken

Field Detail

_is16bitUnicodeback to summary
private final boolean _is16bitUnicode
field_3_stringback to summary
private final String field_3_string

Note

OO doc says 16bit length, but BiffViewer says 8 Book says something totally different, so don't look there!

FORMULA_DELIMITERback to summary
private static final char FORMULA_DELIMITER

the character (") used in formulas to delimit string literals

sidback to summary
public static final byte sid

Constructor Detail

StringPtgback to summary
public StringPtg(LittleEndianInput in)

Create a StringPtg from a stream

StringPtgback to summary
public StringPtg(String value)

Create a StringPtg from a string representation of the number Number format is not checked, it is expected to be validated in the parser that calls this method.

Parameters
value:String

: String representation of a floating point number

Method Detail

copyback to summary
public StringPtg copy()

Implements abstract org.apache.poi.ss.formula.ptg.Ptg.copy.

Implements org.apache.poi.common.Duplicatable.copy.

Returns:StringPtg

Doc from org.apache.poi.common.Duplicatable.copy.

a deep copy of the implementing class / instance

Annotations
@Override
getGenericPropertiesback to summary
public Map<String, Supplier<?>> getGenericProperties()

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

Annotations
@Override
getSidback to summary
public byte getSid()

Implements abstract org.apache.poi.ss.formula.ptg.Ptg.getSid.

Returns:byte

Doc from org.apache.poi.ss.formula.ptg.Ptg.getSid.

structure id of the parsed thing, or -1 if the record has no sid

Annotations
@Override
getSizeback to summary
public int getSize()

Implements abstract org.apache.poi.ss.formula.ptg.Ptg.getSize.

Returns:int

Doc from org.apache.poi.ss.formula.ptg.Ptg.getSize.

the encoded length of this Ptg, including the initial Ptg type identifier byte.

getValueback to summary
public String getValue()
toFormulaStringback to summary
public String toFormulaString()

Implements abstract org.apache.poi.ss.formula.ptg.Ptg.toFormulaString.

Doc from org.apache.poi.ss.formula.ptg.Ptg.toFormulaString.

return a string representation of this token alone

writeback to summary
public void write(LittleEndianOutput out)

Implements abstract org.apache.poi.ss.formula.ptg.Ptg.write.