public final class TraceStack extends AbstractEvalStepListener
fHint
Constructor and Description |
---|
TraceStack(java.util.function.Predicate<IExpr> matcher,
IAST list) |
Modifier and Type | Method and Description |
---|---|
void |
add(IExpr expr)
Add the expression to the internal trace list, if the trace matcher returns
true . |
void |
add(IExpr inputExpr,
IExpr resultExpr,
int recursionDepth,
long iterationCounter,
java.lang.String hint)
Add a new step in which the
inputExpr was evaluated to the
new resultExpr . |
void |
addIfEmpty(IExpr expr)
Add the expression to the internal trace list, if the trace matcher returns
true and the trace lit is empty. |
IAST |
getList() |
void |
popList() |
void |
pushList() |
void |
setUp(IExpr inputExpr,
int recursionDepth)
Sets up the next evaluation step.
|
void |
tearDown(int recursionDepth)
Tear down this evaluation step (called finally at the evaluation loop).
|
getHint, setHint
public void pushList()
public void popList()
public IAST getList()
public void add(IExpr expr)
true
.expr
- an expressionpublic void addIfEmpty(IExpr expr)
true
and the trace lit is empty.expr
- an expressionpublic void setUp(IExpr inputExpr, int recursionDepth)
AbstractEvalStepListener
setUp
in interface IEvalStepListener
setUp
in class AbstractEvalStepListener
inputExpr
- the inpput expression which should currently be evaluatedrecursionDepth
- the current recursion depth of this evaluation steppublic void tearDown(int recursionDepth)
AbstractEvalStepListener
tearDown
in interface IEvalStepListener
tearDown
in class AbstractEvalStepListener
recursionDepth
- the current recursion depth of this evaluation steppublic void add(IExpr inputExpr, IExpr resultExpr, int recursionDepth, long iterationCounter, java.lang.String hint)
AbstractEvalStepListener
inputExpr
was evaluated to the
new resultExpr
.add
in interface IEvalStepListener
add
in class AbstractEvalStepListener
inputExpr
- the input expressionresultExpr
- the evaluated result expressionrecursionDepth
- the current recursion depthiterationCounter
- the current iteration counterhint
- this hint will be used in the listener, if no other hint was
set with the setHint()
method.IEvalStepListener.setHint(String)