Package loci.poi.hssf.record.formula
Class NumberPtg
- java.lang.Object
-
- loci.poi.hssf.record.formula.Ptg
-
- loci.poi.hssf.record.formula.NumberPtg
-
public class NumberPtg extends Ptg
Number Stores a floating point value in a formula value stored in a 8 byte field using IEEE notation- Author:
- Avik Sengupta, Jason Height (jheight at chariot dot net dot au)
-
-
Field Summary
Fields Modifier and Type Field Description static bytesidstatic intSIZE-
Fields inherited from class loci.poi.hssf.record.formula.Ptg
CLASS_ARRAY, CLASS_REF, CLASS_VALUE, ptgClass
-
-
Constructor Summary
Constructors Constructor Description NumberPtg(java.lang.String value)Create a NumberPtg 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.NumberPtg(RecordInputStream in)Create a NumberPtg from a byte array read from disk
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()bytegetDefaultOperandClass()intgetSize()doublegetValue()voidsetValue(double value)java.lang.StringtoFormulaString(Workbook book)return a string representation of this token alonevoidwriteBytes(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
-
NumberPtg
public NumberPtg(RecordInputStream in)
Create a NumberPtg from a byte array read from disk
-
NumberPtg
public NumberPtg(java.lang.String value)
Create a NumberPtg 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
-
setValue
public void setValue(double value)
-
getValue
public double getValue()
-
writeBytes
public void writeBytes(byte[] array, int offset)Description copied from class:Ptgwrite this Ptg to a byte array- Specified by:
writeBytesin classPtg
-
toFormulaString
public java.lang.String toFormulaString(Workbook book)
Description copied from class:Ptgreturn a string representation of this token alone- Specified by:
toFormulaStringin classPtg
-
getDefaultOperandClass
public byte getDefaultOperandClass()
- Specified by:
getDefaultOperandClassin classPtg
-
-