|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.ss.formula.ptg.Ptg org.apache.poi.ss.formula.ptg.OperationPtg org.apache.poi.ss.formula.ptg.AbstractFunctionPtg
public abstract class AbstractFunctionPtg
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
Field Summary | |
---|---|
static java.lang.String |
FUNCTION_NAME_IF
The name of the IF function (i.e. |
Fields inherited from class org.apache.poi.ss.formula.ptg.OperationPtg |
---|
TYPE_BINARY, TYPE_FUNCTION, TYPE_UNARY |
Fields inherited from class org.apache.poi.ss.formula.ptg.Ptg |
---|
CLASS_ARRAY, CLASS_REF, CLASS_VALUE, EMPTY_PTG_ARRAY |
Constructor Summary | |
---|---|
protected |
AbstractFunctionPtg(int functionIndex,
int pReturnClass,
byte[] paramTypes,
int nParams)
|
Method Summary | |
---|---|
byte |
getDefaultOperandClass()
|
short |
getFunctionIndex()
|
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)
|
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 |
java.lang.String |
toString()
Overridden toString method to ensure object hash is not printed. |
Methods inherited from class org.apache.poi.ss.formula.ptg.Ptg |
---|
createPtg, doesFormulaReferToDeletedCell, getEncodedSize, getEncodedSizeWithoutArrayData, getPtgClass, getRVAType, readTokens, serializePtgs, setClass, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FUNCTION_NAME_IF
Constructor Detail |
---|
protected AbstractFunctionPtg(int functionIndex, int pReturnClass, byte[] paramTypes, int nParams)
Method Detail |
---|
public final boolean isBaseToken()
isBaseToken
in class Ptg
false
if this token is classified as 'reference', 'value', or 'array'public final java.lang.String toString()
Ptg
toString
in class Ptg
public final short getFunctionIndex()
public final int getNumberOfOperands()
OperationPtg
getNumberOfOperands
in class OperationPtg
public final java.lang.String getName()
public final boolean isExternalFunction()
true
if this is an external functionpublic final java.lang.String toFormulaString()
Ptg
toFormulaString
in class Ptg
public java.lang.String toFormulaString(java.lang.String[] operands)
OperationPtg
toFormulaString
in class OperationPtg
OperationPtg.getNumberOfOperands()
public abstract int getSize()
getSize
in class Ptg
public static final 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 final java.lang.String lookupName(short index)
protected static short lookupIndex(java.lang.String name)
The name matching is case insensitive.
public byte getDefaultOperandClass()
getDefaultOperandClass
in class OperationPtg
public final byte getParameterClass(int index)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |