org.jfree.report.expressions
Class AbstractExpression
java.lang.Object
org.jfree.report.expressions.AbstractExpression
- Cloneable, Expression, Serializable
A baseclass for simple, non-positionally parametrized expressions.
clone
public Object clone()
throws 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.
- clone in interface Expression
- A clone of this expression.
getInstance
public Expression getInstance()
Return a new instance of this expression. The copy is initialized and uses
the same parameters as the original, but does not share any objects.
- getInstance in interface Expression
getName
public String getName()
Returns the name of the expression. An expression without a name cannot be
referenced from outside the element.
- getName in interface Expression
isDeepTraversing
public boolean isDeepTraversing()
A deep-traversing expression declares that it should receive updates from
all subreports. This mode should be activated if the expression's result
depends on values contained in the subreport.
- isDeepTraversing in interface Expression
- true, if the expression is deep-traversing, false otherwise.
isPrecompute
public boolean isPrecompute()
Returns, whether the expression will be precomputed. For precomputed
expressions a parallel evaluation process is started and the result to
which the expression evaluates before it gets out of scope will be used
whenever an other expression queries this expression's value.
- isPrecompute in interface Expression
- true, if the expression is precomputed, false otherwise.
isPreserve
public boolean isPreserve()
Checks, whether the expression's result should be preserved in the
precomputed value registry. This way, the last value for that expression
can be retrieved after the report has been finished.
The preserve-function will only preserve the last value that has been
evaluated before the expression went out of scope.
- isPreserve in interface Expression
- true, if the expression's results should be preserved,
false otherwise.
setDeepTraversing
public void setDeepTraversing(boolean deepTraversing)
Defines, whether the expression is deep-traversing.
- setDeepTraversing in interface Expression
deepTraversing
- true, if the expression is deep-traversing, false
otherwise.
setPrecompute
public void setPrecompute(boolean precompute)
Defines, whether the expression will be precomputed. For precomputed
expressions a parallel evaluation process is started and the result to
which the expression evaluates before it gets out of scope will be used
whenever an other expression queries this expression's value.
- setPrecompute in interface Expression
precompute
- true, if the expression is precomputed, false otherwise.
setPreserve
public void setPreserve(boolean preserve)
Defines, whether the expression's result should be preserved in the
precomputed value registry. This way, the last value for that expression
can be retrieved after the report has been finished.
- setPreserve in interface Expression
preserve
- true, if the expression's results should be preserved,
false otherwise.
setRuntime
public void setRuntime(ExpressionRuntime runtime)
Defines the DataRow used in this expression. The dataRow is set when the
report processing starts and can be used to access the values of functions,
expressions and the reports datasource.
- setRuntime in interface Expression
runtime
- the runtime information for the expression