Class AbstractFunctionPtg

  • Direct Known Subclasses:
    FuncPtg, FuncVarPtg

    public abstract class AbstractFunctionPtg
    extends OperationPtg
    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 Detail

      • functionData

        protected static Object[][] 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 Detail

      • AbstractFunctionPtg

        public AbstractFunctionPtg()
    • Method Detail

      • toString

        public String toString()
        Description copied from class: Ptg
        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:
        toString in class Ptg
      • getFunctionIndex

        public short getFunctionIndex()
      • getName

        public String getName()
      • toFormulaString

        public String toFormulaString​(Workbook book)
        Description copied from class: Ptg
        return a string representation of this token alone
        Specified by:
        toFormulaString in class Ptg
      • writeBytes

        public abstract void writeBytes​(byte[] array,
                                        int offset)
        Description copied from class: Ptg
        write this Ptg to a byte array
        Specified by:
        writeBytes in class Ptg
      • getSize

        public abstract int getSize()
        Specified by:
        getSize in class Ptg
      • lookupName

        protected String lookupName​(short index)
      • lookupIndex

        protected short lookupIndex​(String name)
      • getParameterClass

        public byte getParameterClass​(int index)