public final class UnaryExpression<U,T> extends Expression<T>
Modifier and Type | Field and Description |
---|---|
private java.util.function.Function<U,T> |
evaluator |
private Expression<U> |
operand |
Constructor and Description |
---|
UnaryExpression(Expression<U> operand,
java.util.function.Function<U,T> evaluator) |
Modifier and Type | Method and Description |
---|---|
T |
evaluate(java.lang.Object namespace)
Evaluates the expression.
|
protected void |
getArguments(java.util.List<KeyPath> arguments)
Populates a list of arguments to this expression.
|
boolean |
isDefined(java.lang.Object namespace)
Tests whether the expression is defined.
|
boolean |
isLValue()
Tests whether the expression represents an l-value (i.e.
|
void |
update(java.lang.Object namespace,
T value)
Updates the expression value.
|
add, add, add, add, and, and, and, and, divide, divide, divide, divide, equalTo, equalTo, equalTo, equalTo, get, get, getArguments, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanOrEqualTo, greaterThanOrEqualTo, greaterThanOrEqualTo, greaterThanOrEqualTo, isDefined, isDefined, lessThan, lessThan, lessThan, lessThan, lessThanOrEqualTo, lessThanOrEqualTo, lessThanOrEqualTo, lessThanOrEqualTo, modulo, modulo, modulo, modulo, multiply, multiply, multiply, multiply, negate, negate, not, not, notEqualTo, notEqualTo, notEqualTo, notEqualTo, or, or, or, or, set, set, subtract, subtract, subtract, subtract, valueOf
private final Expression<U> operand
public UnaryExpression(Expression<U> operand, java.util.function.Function<U,T> evaluator)
public T evaluate(java.lang.Object namespace)
Expression
evaluate
in class Expression<T>
namespace
- The namespace against which the expression will be evaluated.public void update(java.lang.Object namespace, T value)
Expression
update
in class Expression<T>
namespace
- The namespace against which the expression will be evaluated.value
- The value to assign to the expression.public boolean isDefined(java.lang.Object namespace)
Expression
isDefined
in class Expression<T>
namespace
- The namespace against which the expression will be evaluated.public boolean isLValue()
Expression
isLValue
in class Expression<T>
protected void getArguments(java.util.List<KeyPath> arguments)
Expression
getArguments
in class Expression<T>