O
- The type of the operand.R
- The type of the result.public abstract class UnaryExpression<O,R> extends PassiveExpression<R>
Expression
with a single data dependency, whose
value is derived through the application of a function to the value of that
dependency. This function may also be provided through an Expression
dependency.Constructor and Description |
---|
UnaryExpression(Expression<? extends O> operand,
java.util.function.Function<? super O,? extends R> operation) |
Modifier and Type | Method and Description |
---|---|
protected R |
evaluate() |
Expression<? extends O> |
getOperand() |
getValue, invalidations
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
anonymize, decoupleValue, immutable, over, over
public UnaryExpression(Expression<? extends O> operand, java.util.function.Function<? super O,? extends R> operation)
operand
- An expression providing an operand for the function.operation
- A function transforming an operand into a value of this expression's
type.public Expression<? extends O> getOperand()
protected R evaluate()
evaluate
in class PassiveExpression<R>
Expression
as derived from the dependency
Expression
s.