## org.jfree.report.expressions
Class FormulaExpression

    java.lang.Object
      org.jfree.report.expressions.AbstractExpression
          org.jfree.report.expressions.FormulaExpression

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, Expression

    public class FormulaExpression

extends AbstractExpression

Creation-Date: 04.11.2006, 19:24:04

Author:
  Thomas Morgner
See Also:
  Serialized Form

Constructor Summary
`FormulaExpression()`

Method Summary
`java.lang.Object` `clone()` Clones the expression, expression should be reinitialized after the cloning.
`java.lang.Object` `computeValue()` Return the current expression value.
`org.pentaho.reporting.libraries.formula.Formula` `getCompiledFormula()` Returns the compiled formula.
`java.lang.String` `getFormula()`
`java.lang.String` `getFormulaExpression()`
`java.lang.String` `getFormulaNamespace()`
`void` `setFormula(java.lang.String formula)`

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`

Constructor Detail

### FormulaExpression

    public FormulaExpression()

Method Detail

### 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)

### getCompiledFormula

    public org.pentaho.reporting.libraries.formula.Formula getCompiledFormula()
                                                                       throws org.pentaho.reporting.libraries.formula.parser.ParseException

  Returns 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.

### computeValue

    public java.lang.Object computeValue()
                                  throws DataSourceException

  Return the current expression value.

  The value depends (obviously) on the expression implementation.

  Returns:
    the value of the function.
  Throws:
    `DataSourceException`

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  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.

  Specified by:
    `clone` in interface `Expression`
  Overrides:
    `clone` in class `AbstractExpression`
  Returns:
    A clone of this expression.
  Throws:
    `java.lang.CloneNotSupportedException` - this should never happen.