public abstract class AbstractFunctionPtg extends OperationPtg
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FUNCTION_NAME_IF
The name of the IF function (i.e.
|
TYPE_BINARY, TYPE_FUNCTION, TYPE_UNARYCLASS_ARRAY, CLASS_REF, CLASS_VALUE, EMPTY_PTG_ARRAY| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFunctionPtg(int functionIndex,
int pReturnClass,
byte[] paramTypes,
int nParams) |
| Modifier and Type | Method and Description |
|---|---|
byte |
getDefaultOperandClass() |
short |
getFunctionIndex() |
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
java.lang.String |
getName() |
int |
getNumberOfOperands()
The number of operands expected by the operations
|
byte |
getParameterClass(int index) |
abstract int |
getSize() |
boolean |
isBaseToken() |
static boolean |
isBuiltInFunctionName(java.lang.String name)
Used to detect whether a function name found in a formula is one of the standard excel functions
|
boolean |
isExternalFunction()
external functions get some special processing
|
protected static short |
lookupIndex(java.lang.String name)
Resolves internal function names into function indexes.
|
protected java.lang.String |
lookupName(short index) |
protected java.lang.String |
lookupName(short index,
boolean isCetab) |
java.lang.String |
toFormulaString()
return a string representation of this token alone
|
java.lang.String |
toFormulaString(java.lang.String[] operands)
returns a string representation of the operations
the length of the input array should equal the number returned by
|
copy, createPtg, doesFormulaReferToDeletedCell, getEncodedSize, getEncodedSizeWithoutArrayData, getPtgClass, getRVAType, getSid, readTokens, serializePtgs, setClass, toString, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetGenericChildren, getGenericRecordTypepublic static final java.lang.String FUNCTION_NAME_IF
protected AbstractFunctionPtg(int functionIndex,
int pReturnClass,
byte[] paramTypes,
int nParams)
public final boolean isBaseToken()
isBaseToken in class Ptgfalse if this token is classified as 'reference', 'value', or 'array'public final short getFunctionIndex()
public final int getNumberOfOperands()
OperationPtggetNumberOfOperands in class OperationPtgpublic final java.lang.String getName()
public final boolean isExternalFunction()
true if this is an external functionpublic final java.lang.String toFormulaString()
PtgtoFormulaString in class Ptgpublic java.lang.String toFormulaString(java.lang.String[] operands)
OperationPtgtoFormulaString in class OperationPtgOperationPtg.getNumberOfOperands()public abstract int getSize()
public static boolean isBuiltInFunctionName(java.lang.String name)
The name matching is case insensitive.
true if the name specifies a standard worksheet function,
false if the name should be assumed to be an external function.protected java.lang.String lookupName(short index)
protected final java.lang.String lookupName(short index,
boolean isCetab)
protected static short lookupIndex(java.lang.String name)
The name matching is case insensitive.
FUNCTION_INDEX_EXTERNALpublic byte getDefaultOperandClass()
getDefaultOperandClass in class OperationPtgpublic final byte getParameterClass(int index)
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
getGenericProperties in interface GenericRecordgetGenericProperties in class OperationPtgCopyright 2022 The Apache Software Foundation or its licensors, as applicable.