Class FormulaExpression

  • All Implemented Interfaces:
    Serializable, Cloneable, Expression

    public final class FormulaExpression
    extends AbstractExpression
    The formula expression is used to evaluate a LibFormula/OpenFormula expression. There is generally no need to reference this class directly, as this expression is used automatically if a formula is specified in a element, style-expression or common expression.
    Author:
    Thomas Morgner
    See Also:
    Serialized Form
    • Constructor Detail

      • FormulaExpression

        public FormulaExpression()
        Default Constructor.
    • Method Detail

      • getFailOnError

        public Boolean getFailOnError()
      • setFailOnError

        public void setFailOnError​(Boolean failOnError)
      • getFormula

        public String getFormula()
        Returns the formula (incuding the optional namespace) as defined by the OpenFormula standard.
        Returns:
        the formula as text.
      • getFormulaNamespace

        public String getFormulaNamespace()
        Returns the formula namespace. If the formula specified by the user starts with "=", then the namespace "report" is assumed.
        Returns:
        the namespace of the formula.
      • getFormulaExpression

        public String getFormulaExpression()
        Returns the formula expression.
        Returns:
        the formula expression.
      • setFormula

        public void setFormula​(String formula)
        Defines the formula (including the optional namespace) as defined by the OpenFormula standard.
        Parameters:
        formula - the formula as text.
      • getValue

        public Object getValue()
        Return the computed value of the formula.
        Returns:
        the value of the function.
      • isFormulaError

        public boolean isFormulaError()
      • getFormulaError

        public Exception getFormulaError()
      • getInstance

        public Expression getInstance()
        Return a completly separated copy of this function. The copy does no longer share any changeable objects with the original function.
        Specified by:
        getInstance in interface Expression
        Overrides:
        getInstance in class AbstractExpression
        Returns:
        a copy of this function.