Package loci.poi.hssf.record.formula
Class Ptg
- java.lang.Object
-
- loci.poi.hssf.record.formula.Ptg
-
- Direct Known Subclasses:
Area3DPtg,AreaPtg,ArrayPtg,BoolPtg,ControlPtg,ErrPtg,ExpPtg,IntPtg,MemAreaPtg,MissingArgPtg,NamePtg,NameXPtg,NumberPtg,OperationPtg,Ref3DPtg,ReferencePtg,RefErrorPtg,StringPtg,UnknownPtg
public abstract class Ptg extends java.lang.Object- Author:
- andy, avik, Jason Height (jheight at chariot dot net dot au)
-
-
Field Summary
Fields Modifier and Type Field Description static byteCLASS_ARRAYstatic byteCLASS_REFstatic byteCLASS_VALUEprotected byteptgClass
-
Constructor Summary
Constructors Constructor Description Ptg()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.Objectclone()static java.util.StackcreateParsedExpressionTokens(short size, RecordInputStream in)static PtgcreatePtg(RecordInputStream in)byte[]getBytes()abstract bytegetDefaultOperandClass()bytegetPtgClass()returns the class (REF/VALUE/ARRAY) for this Ptgabstract intgetSize()static intserializePtgStack(java.util.Stack expression, byte[] array, int offset)voidsetClass(byte thePtgClass)java.lang.StringtoDebugString()dump a debug representation (hexdump) to a stringabstract java.lang.StringtoFormulaString(Workbook book)return a string representation of this token alonejava.lang.StringtoString()Overridden toString method to ensure object hash is not printed.abstract voidwriteBytes(byte[] array, int offset)write this Ptg to a byte array
-
-
-
Field Detail
-
CLASS_REF
public static final byte CLASS_REF
- See Also:
- Constant Field Values
-
CLASS_VALUE
public static final byte CLASS_VALUE
- See Also:
- Constant Field Values
-
CLASS_ARRAY
public static final byte CLASS_ARRAY
- See Also:
- Constant Field Values
-
ptgClass
protected byte ptgClass
-
-
Method Detail
-
createParsedExpressionTokens
public static java.util.Stack createParsedExpressionTokens(short size, RecordInputStream in)
-
createPtg
public static Ptg createPtg(RecordInputStream in)
-
serializePtgStack
public static int serializePtgStack(java.util.Stack expression, byte[] array, int offset)
-
getSize
public abstract int getSize()
-
getBytes
public final byte[] getBytes()
-
writeBytes
public abstract void writeBytes(byte[] array, int offset)write this Ptg to a byte array
-
toFormulaString
public abstract java.lang.String toFormulaString(Workbook book)
return a string representation of this token alone
-
toDebugString
public java.lang.String toDebugString()
dump a debug representation (hexdump) to a string
-
toString
public java.lang.String toString()
Overridden toString method to ensure object hash is not printed. This helps get rid of gratuitous diffs when comparing two dumps Subclasses may output more relevant information by overriding this method- Overrides:
toStringin classjava.lang.Object
-
setClass
public void setClass(byte thePtgClass)
-
getPtgClass
public byte getPtgClass()
returns the class (REF/VALUE/ARRAY) for this Ptg
-
getDefaultOperandClass
public abstract byte getDefaultOperandClass()
-
clone
public abstract java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
-