|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pentaho.reporting.libraries.formula.lvalues.AbstractLValue
org.pentaho.reporting.libraries.formula.lvalues.FormulaFunction
public class FormulaFunction
A function. Formulas consist of functions, references or static values, which are connected by operators.
Functions always have a cannonical name, which must be unique and which identifies the function. Functions can have a list of parameters. The number of parameters can vary, and not all parameters need to be filled. Functions can have required and optional parameters. Mixing required and optional parameters is not allowed. Optional parameters cannot be ommited, unless they are the last parameter in the list. This class provides the necessary wrapper functionality to fill in the parameters.
| Constructor Summary | |
|---|---|
FormulaFunction(java.lang.String functionName,
LValue[] parameters)
|
|
FormulaFunction(java.lang.String functionName,
LValue[] parameters,
ParsePosition parsePosition)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
TypeValuePair |
evaluate()
|
LValue[] |
getChildValues()
Returns any dependent lvalues (parameters and operands, mostly). |
Function |
getFunction()
Returns the initialized function. |
java.lang.String |
getFunctionName()
Returns the function's name. |
FunctionDescription |
getMetaData()
Returns the function's meta-data. |
void |
initialize(FormulaContext context)
|
boolean |
isConstant()
Checks whether the LValue is constant. |
java.lang.String |
toString()
|
| Methods inherited from class org.pentaho.reporting.libraries.formula.lvalues.AbstractLValue |
|---|
getContext, getParsePosition, getValueType, setParsePosition |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FormulaFunction(java.lang.String functionName,
LValue[] parameters,
ParsePosition parsePosition)
public FormulaFunction(java.lang.String functionName,
LValue[] parameters)
| Method Detail |
|---|
public void initialize(FormulaContext context)
throws EvaluationException
initialize in interface LValueinitialize in class AbstractLValueEvaluationExceptionpublic java.lang.String getFunctionName()
public Function getFunction()
public FunctionDescription getMetaData()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface LValueclone in class AbstractLValuejava.lang.CloneNotSupportedException
public TypeValuePair evaluate()
throws EvaluationException
EvaluationExceptionpublic LValue[] getChildValues()
getChildValues in interface LValuegetChildValues in class AbstractLValuepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isConstant()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||