org.jfree.report.expressions

Class FormulaFunction

public class FormulaFunction extends AbstractExpression implements Function

Creation-Date: 04.11.2006, 19:24:04

Author: Thomas Morgner

Constructor Summary
FormulaFunction()
Method Summary
Functionadvance()
When the advance method is called, the function is asked to perform the next step of its computation.
Objectclone()
Clones the expression, expression should be reinitialized after the cloning.
ObjectcomputeValue()
Return the current expression value.
FormulagetCompiledFormula()
Returns the compiled formula.
StringgetFormula()
StringgetFormulaExpression()
StringgetFormulaNamespace()
StringgetInitial()
StringgetInitialExpression()
StringgetInitialNamespace()
voidsetFormula(String formula)
voidsetInitial(String initial)

Constructor Detail

FormulaFunction

public FormulaFunction()

Method Detail

advance

public Function advance()
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).

Returns: a copy of the function containing the new state.

clone

public Object clone()
Clones 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.

Returns: A clone of this expression.

Throws: CloneNotSupportedException this should never happen.

computeValue

public Object computeValue()
Return the current expression value.

The value depends (obviously) on the expression implementation.

Returns: the value of the function.

getCompiledFormula

public Formula getCompiledFormula()
Returns the compiled formula. The formula is not connected to a formula context.

Returns: the formula.

Throws: ParseException if the formula contains syntax errors.

getFormula

public String getFormula()

getFormulaExpression

public String getFormulaExpression()

getFormulaNamespace

public String getFormulaNamespace()

getInitial

public String getInitial()

getInitialExpression

public String getInitialExpression()

getInitialNamespace

public String getInitialNamespace()

setFormula

public void setFormula(String formula)

setInitial

public void setInitial(String initial)