Package loci.poi.hssf.record.formula
Class AbstractFunctionPtg
java.lang.Object
loci.poi.hssf.record.formula.Ptg
loci.poi.hssf.record.formula.OperationPtg
loci.poi.hssf.record.formula.AbstractFunctionPtg
- Direct Known Subclasses:
FuncPtg,FuncVarPtg
This class provides the base functionality for Excel sheet functions
There are two kinds of function Ptgs - tFunc and tFuncVar
Therefore, this class will have ONLY two subclasses
- Author:
- Avik Sengupta, Andrew C. Oliver (acoliver at apache dot org)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected byteprotected shortprotected static Object[][]static final shortprotected byte[]protected byteFields inherited from class loci.poi.hssf.record.formula.OperationPtg
TYPE_BINARY, TYPE_FUNCTION, TYPE_UNARYFields inherited from class loci.poi.hssf.record.formula.Ptg
CLASS_ARRAY, CLASS_REF, CLASS_VALUE, ptgClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyteshortgetName()bytegetParameterClass(int index) abstract intgetSize()intgetType()protected shortlookupIndex(String name) protected StringlookupName(short index) toFormulaString(String[] operands) returns a string representation of the operations the length of the input array should equal the number returned bytoFormulaString(Workbook book) return a string representation of this token alonetoString()Overridden toString method to ensure object hash is not printed.abstract voidwriteBytes(byte[] array, int offset) write this Ptg to a byte arrayMethods inherited from class loci.poi.hssf.record.formula.OperationPtg
getNumberOfOperandsMethods inherited from class loci.poi.hssf.record.formula.Ptg
clone, createParsedExpressionTokens, createPtg, getBytes, getPtgClass, serializePtgStack, setClass, toDebugString
-
Field Details
-
ATTR_NAME
- See Also:
-
INDEX_EXTERNAL
public static final short INDEX_EXTERNAL- See Also:
-
functionData
-
returnClass
protected byte returnClass -
paramClass
protected byte[] paramClass -
field_1_num_args
protected byte field_1_num_args -
field_2_fnc_index
protected short field_2_fnc_index
-
-
Constructor Details
-
AbstractFunctionPtg
public AbstractFunctionPtg()
-
-
Method Details
-
toString
Description copied from class:PtgOverridden 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 -
getType
public int getType()- Specified by:
getTypein classOperationPtg
-
getFunctionIndex
public short getFunctionIndex() -
getName
-
toFormulaString
Description copied from class:Ptgreturn a string representation of this token alone- Specified by:
toFormulaStringin classPtg
-
toFormulaString
Description copied from class:OperationPtgreturns a string representation of the operations the length of the input array should equal the number returned by- Specified by:
toFormulaStringin classOperationPtg- See Also:
-
writeBytes
public abstract void writeBytes(byte[] array, int offset) Description copied from class:Ptgwrite this Ptg to a byte array- Specified by:
writeBytesin classPtg
-
getSize
public abstract int getSize() -
lookupName
-
lookupIndex
-
getDefaultOperandClass
public byte getDefaultOperandClass()- Overrides:
getDefaultOperandClassin classOperationPtg
-
getParameterClass
public byte getParameterClass(int index)
-