public abstract class UnaryValueExpression extends Object implements ValueExpression
ValueExpressions with one operand.
A UnaryValueExpression implements a ValueExpression that has one
operand (a ValueExpression). The operand is first
evaluated. If it evaluates to OptionalValue.empty(), the result of
the ValueExpression itself will be that as well.
To implement a UnaryValueExpression, only the
eval(Value, Environment, Encoding) must be implemented, handling
the case of evaluating one value. This base class takes care of evaluating
the operand and handling list semantics.
BinaryValueExpression| Modifier and Type | Field and Description |
|---|---|
ValueExpression |
operand |
| Constructor and Description |
|---|
UnaryValueExpression(ValueExpression operand) |
| Modifier and Type | Method and Description |
|---|---|
ImmutableList<OptionalValue> |
eval(Environment environment,
Encoding encoding) |
abstract OptionalValue |
eval(Value value,
Environment environment,
Encoding encoding) |
String |
toString() |
public final ValueExpression operand
public UnaryValueExpression(ValueExpression operand)
public ImmutableList<OptionalValue> eval(Environment environment, Encoding encoding)
eval in interface ValueExpressionpublic abstract OptionalValue eval(Value value, Environment environment, Encoding encoding)
Copyright © 2017. All rights reserved.