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 Optional.empty(), the result of the
ValueExpression itself will be that as well.
To implement a UnaryValueExpression, only the
eval(Value, ParseState, 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 |
|---|---|
boolean |
equals(Object obj) |
ImmutableList<Optional<Value>> |
eval(ParseState parseState,
Encoding encoding) |
abstract Optional<Value> |
eval(Value value,
ParseState parseState,
Encoding encoding) |
int |
hashCode() |
String |
toString() |
public final ValueExpression operand
public UnaryValueExpression(ValueExpression operand)
public ImmutableList<Optional<Value>> eval(ParseState parseState, Encoding encoding)
eval in interface ValueExpressionpublic abstract Optional<Value> eval(Value value, ParseState parseState, Encoding encoding)
Copyright © 2017. All rights reserved.