public abstract class Expression
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Expression.PointerIterator
Pointer iterator
|
static class |
Expression.ValueIterator
Value Iterator
|
Modifier and Type | Field and Description |
---|---|
private boolean |
contextDependencyKnown |
private boolean |
contextDependent |
protected static java.lang.Double |
NOT_A_NUMBER
NaN
|
protected static java.lang.Double |
ONE
one
|
protected static java.lang.Double |
ZERO
zero
|
Constructor and Description |
---|
Expression() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
compute(EvalContext context)
Evaluates the expression.
|
abstract boolean |
computeContextDependent()
Implemented by subclasses and result is cached by isContextDependent()
|
abstract java.lang.Object |
computeValue(EvalContext context)
Evaluates the expression.
|
boolean |
isContextDependent()
Returns true if this expression should be re-evaluated
each time the current position in the context changes.
|
java.util.Iterator |
iterate(EvalContext context)
Iterate over the values from the specified context.
|
java.util.Iterator |
iteratePointers(EvalContext context)
Iterate over the pointers from the specified context.
|
protected static final java.lang.Double ZERO
protected static final java.lang.Double ONE
protected static final java.lang.Double NOT_A_NUMBER
private boolean contextDependencyKnown
private boolean contextDependent
public boolean isContextDependent()
public abstract boolean computeContextDependent()
public abstract java.lang.Object computeValue(EvalContext context)
context
- evaluation contextpublic abstract java.lang.Object compute(EvalContext context)
context
- evaluation contextpublic java.util.Iterator iterate(EvalContext context)
context
- evaluation contextpublic java.util.Iterator iteratePointers(EvalContext context)
context
- evaluation context