@Deprecated
public static class CalculatorExpr.Data
extends java.lang.Object
CalculatorExpr
itself in multithreading/multicore,
but any thread should have its own data. The data instance can be reused in the same thread for the next operation.
Invoke clean() before reusing.Modifier and Type | Field and Description |
---|---|
protected CalculatorExpr.Value |
accu
Deprecated.
The top of stack is the accumulator for the current level of adequate operations,
for example all multiplications without stack changing.
|
protected java.util.Stack<CalculatorExpr.Value> |
stack
Deprecated.
The stack of values used temporary.
|
Constructor and Description |
---|
Data()
Deprecated.
Default empty constructor should be called one time before a specific or all calculations are executed.
|
Modifier and Type | Method and Description |
---|---|
void |
clean()
Deprecated.
Cleans, creates a new
accu instance for its cummulativ calculation. |
protected CalculatorExpr.Value accu
protected final java.util.Stack<CalculatorExpr.Value> stack
public Data()
clean()
before it is reused for the next calculation.public void clean()
accu
instance for its cummulativ calculation.
It means if the accu
instance from a calculation before was stored in any other context (are reference),
then is is possible, without problems.
It also call Vector.clear()
to guarantee an empty stack, which may be hang from an exception before.