Package org.jfree.report.expressions
Class FormulaFunction
- java.lang.Object
-
- org.jfree.report.expressions.AbstractExpression
-
- org.jfree.report.expressions.FormulaFunction
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,Expression,Function
public class FormulaFunction extends AbstractExpression implements Function
Creation-Date: 04.11.2006, 19:24:04- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FormulaFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Functionadvance()When the advance method is called, the function is asked to perform the next step of its computation.java.lang.Objectclone()Clones the expression, expression should be reinitialized after the cloning.java.lang.ObjectcomputeValue()Return the current expression value.org.pentaho.reporting.libraries.formula.FormulagetCompiledFormula()Returns the compiled formula.java.lang.StringgetFormula()java.lang.StringgetFormulaExpression()java.lang.StringgetFormulaNamespace()java.lang.StringgetInitial()java.lang.StringgetInitialExpression()java.lang.StringgetInitialNamespace()voidsetFormula(java.lang.String formula)voidsetInitial(java.lang.String initial)-
Methods inherited from class org.jfree.report.expressions.AbstractExpression
getDataRow, getInstance, getName, getParentLocale, getReportConfiguration, getResourceBundleFactory, getRuntime, isDeepTraversing, isPrecompute, isPreserve, setDeepTraversing, setName, setPrecompute, setPreserve, setRuntime
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jfree.report.expressions.Expression
getInstance, getName, isDeepTraversing, isPrecompute, isPreserve, setDeepTraversing, setName, setPrecompute, setPreserve, setRuntime
-
-
-
-
Method Detail
-
getInitial
public java.lang.String getInitial()
-
getInitialExpression
public java.lang.String getInitialExpression()
-
getInitialNamespace
public java.lang.String getInitialNamespace()
-
setInitial
public void setInitial(java.lang.String initial)
-
getFormula
public java.lang.String getFormula()
-
getFormulaNamespace
public java.lang.String getFormulaNamespace()
-
getFormulaExpression
public java.lang.String getFormulaExpression()
-
setFormula
public void setFormula(java.lang.String formula)
-
advance
public Function advance() throws DataSourceException
When the advance method is called, the function is asked to perform the next step of its computation. The original function must not be altered during that step (or more correctly, calling advance on the original expression again must not return a different result).- Specified by:
advancein interfaceFunction- Returns:
- a copy of the function containing the new state.
- Throws:
DataSourceException
-
computeValue
public java.lang.Object computeValue() throws DataSourceExceptionReturn the current expression value.The value depends (obviously) on the expression implementation.
- Specified by:
computeValuein interfaceExpression- Returns:
- the value of the function.
- Throws:
DataSourceException
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionClones the expression, expression should be reinitialized after the cloning.Expression maintain no state, cloning is done at the beginning of the report processing to disconnect the used expression from any other object space.
- Specified by:
clonein interfaceExpression- Overrides:
clonein classAbstractExpression- Returns:
- A clone of this expression.
- Throws:
java.lang.CloneNotSupportedException- this should never happen.
-
getCompiledFormula
public org.pentaho.reporting.libraries.formula.Formula getCompiledFormula() throws org.pentaho.reporting.libraries.formula.parser.ParseExceptionReturns the compiled formula. The formula is not connected to a formula context.- Returns:
- the formula.
- Throws:
org.pentaho.reporting.libraries.formula.parser.ParseException- if the formula contains syntax errors.
-
-