org.jfree.formula.function

Interface FunctionDescription

public interface FunctionDescription

A static definition of the function's parameters, return values etc. This is a support class with emphasis on GUI tools. However, the parameter declarations are also used when filling in the parameter values. Functions have a defined set of known parameters and can have a unlimited number of optional parameters. If a function declares at least one parameter and declares that its parameter list is infinite, then the last parameter type is used on all remaining parameters.

Author: Thomas Morgner

Method Summary
FunctionCategorygetCategory()
ObjectgetDefaultValue(int position)
Returns the default value for an optional parameter.
StringgetDescription(Locale locale)
StringgetDisplayName(Locale locale)
intgetParameterCount()
StringgetParameterDescription(int position, Locale locale)
StringgetParameterDisplayName(int position, Locale locale)
TypegetParameterType(int position)
Returns the parameter type at the given position using the function metadata.
TypegetValueType()
booleanisInfiniteParameterCount()
booleanisParameterMandatory(int position)
Defines, whether the parameter at the given position is mandatory.
booleanisVolatile()

Method Detail

getCategory

public FunctionCategory getCategory()

getDefaultValue

public Object getDefaultValue(int position)
Returns the default value for an optional parameter. If the value returned here is null, then this either means, that the parameter is mandatory or that the default value is computed by the expression itself.

Parameters: position

Returns:

getDescription

public String getDescription(Locale locale)

getDisplayName

public String getDisplayName(Locale locale)

getParameterCount

public int getParameterCount()

getParameterDescription

public String getParameterDescription(int position, Locale locale)

getParameterDisplayName

public String getParameterDisplayName(int position, Locale locale)

getParameterType

public Type getParameterType(int position)
Returns the parameter type at the given position using the function metadata. The first parameter is at the position 0;

Parameters: position The parameter index.

Returns: The parameter type.

getValueType

public Type getValueType()

isInfiniteParameterCount

public boolean isInfiniteParameterCount()

isParameterMandatory

public boolean isParameterMandatory(int position)
Defines, whether the parameter at the given position is mandatory. A mandatory parameter must be filled in, while optional parameters need not to be filled in.

Returns:

isVolatile

public boolean isVolatile()