Top Description Fields Constructors Methods
org.apache.poi.ss.formula.function

public final Class FunctionMetadata

extends Object
Class Inheritance

Holds information about Excel built-in functions.

Field Summary

Modifier and TypeField and Description
private final int
private final int
private final int
private final String
private final byte[]
private final byte
private static final short
FUNCTION_MAX_PARAMS

maxParams=30 in functionMetadata.txt means the maximum number arguments supported by the given version of Excel.

Constructor Summary

AccessConstructor and Description
pack-priv
FunctionMetadata(int index, String name, int minParams, int maxParams, byte returnClassCode, byte[] parameterClassCodes)

Method Summary

Modifier and TypeMethod and Description
public int
public int
public int
public String
public byte[]
public byte
public boolean
public boolean

Returns:

true if this function can the maximum number of arguments allowable by the org.apache.poi.ss.SpreadsheetVersion
hasUnlimitedVarags
()

Some varags functions (like VLOOKUP) have a specific limit to the number of arguments that can be passed.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_indexback to summary
private final int _index
_maxParamsback to summary
private final int _maxParams
_minParamsback to summary
private final int _minParams
_nameback to summary
private final String _name
_parameterClassCodesback to summary
private final byte[] _parameterClassCodes
_returnClassCodeback to summary
private final byte _returnClassCode
FUNCTION_MAX_PARAMSback to summary
private static final short FUNCTION_MAX_PARAMS

maxParams=30 in functionMetadata.txt means the maximum number arguments supported by the given version of Excel. Validation routines should take the actual limit (Excel 97 or 2007) from the SpreadsheetVersion enum. Perhaps a value like 'M' should be used instead of '30' in functionMetadata.txt to make that file more version neutral.

Annotations
@SuppressWarnings:JavadocReference
See Also
org.apache.poi.ss.formula.FormulaParser#validateNumArgs(int, FunctionMetadata)

Constructor Detail

FunctionMetadataback to summary
pack-priv FunctionMetadata(int index, String name, int minParams, int maxParams, byte returnClassCode, byte[] parameterClassCodes)

Method Detail

getIndexback to summary
public int getIndex()
getMaxParamsback to summary
public int getMaxParams()
getMinParamsback to summary
public int getMinParams()
getNameback to summary
public String getName()
getParameterClassCodesback to summary
public byte[] getParameterClassCodes()
getReturnClassCodeback to summary
public byte getReturnClassCode()
hasFixedArgsLengthback to summary
public boolean hasFixedArgsLength()
hasUnlimitedVaragsback to summary
public boolean hasUnlimitedVarags()

Some varags functions (like VLOOKUP) have a specific limit to the number of arguments that can be passed. Other functions (like SUM) don't have such a limit. For those functions, the spreadsheet version determines the maximum number of arguments that can be passed.

Returns:boolean

true if this function can the maximum number of arguments allowable by the org.apache.poi.ss.SpreadsheetVersion

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object