Package loci.poi.hssf.record.formula
Class StringPtg
- java.lang.Object
-
- loci.poi.hssf.record.formula.Ptg
-
- loci.poi.hssf.record.formula.StringPtg
-
public class StringPtg extends Ptg
Number Stores a String value in a formula value stored in the format <length 2 bytes>char[]- Author:
- Werner Froidevaux, Jason Height (jheight at chariot dot net dot au), Bernard Chesnoy
-
-
Field Summary
Fields Modifier and Type Field Description static byte
sid
static int
SIZE
-
Fields inherited from class loci.poi.hssf.record.formula.Ptg
CLASS_ARRAY, CLASS_REF, CLASS_VALUE, ptgClass
-
-
Constructor Summary
Constructors Constructor Description 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.StringPtg(RecordInputStream in)
Create a StringPtg from a byte array read from disk
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
byte
getDefaultOperandClass()
int
getSize()
String
getValue()
String
toFormulaString(Workbook book)
return a string representation of this token alonevoid
writeBytes(byte[] array, int offset)
write this Ptg to a byte array-
Methods inherited from class loci.poi.hssf.record.formula.Ptg
createParsedExpressionTokens, createPtg, getBytes, getPtgClass, serializePtgStack, setClass, toDebugString, toString
-
-
-
-
Field Detail
-
SIZE
public static final int SIZE
- See Also:
- Constant Field Values
-
sid
public static final byte sid
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StringPtg
public StringPtg(RecordInputStream in)
Create a StringPtg from a byte array read from disk
-
StringPtg
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 representation of a floating point number
-
-
Method Detail
-
getValue
public String getValue()
-
writeBytes
public void writeBytes(byte[] array, int offset)
Description copied from class:Ptg
write this Ptg to a byte array- Specified by:
writeBytes
in classPtg
-
toFormulaString
public String toFormulaString(Workbook book)
Description copied from class:Ptg
return a string representation of this token alone- Specified by:
toFormulaString
in classPtg
-
getDefaultOperandClass
public byte getDefaultOperandClass()
- Specified by:
getDefaultOperandClass
in classPtg
-
-