|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(String functionName,
LValue[] parameters)
|
|
FormulaFunction(String functionName,
LValue[] parameters,
ParsePosition parsePosition)
|
Method Summary | |
---|---|
Object |
clone()
|
TypeValuePair |
evaluate()
|
LValue[] |
getChildValues()
Returns any dependent lvalues (parameters and operands, mostly). |
Function |
getFunction()
Returns the initialized function. |
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. |
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(String functionName, LValue[] parameters, ParsePosition parsePosition)
public FormulaFunction(String functionName, LValue[] parameters)
Method Detail |
---|
public void initialize(FormulaContext context) throws EvaluationException
initialize
in interface LValue
initialize
in class AbstractLValue
EvaluationException
public String getFunctionName()
public Function getFunction()
public FunctionDescription getMetaData()
public Object clone() throws CloneNotSupportedException
clone
in interface LValue
clone
in class AbstractLValue
CloneNotSupportedException
public TypeValuePair evaluate() throws EvaluationException
EvaluationException
public LValue[] getChildValues()
getChildValues
in interface LValue
getChildValues
in class AbstractLValue
public String toString()
toString
in class Object
public boolean isConstant()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |