public class SubtractionExpression extends Object implements EvaluableExpression
FALSE
Constructor and Description |
---|
SubtractionExpression(EvaluableExpression minuend,
EvaluableExpression subtrahend)
Builds an expression which returns the difference of subtrahend and minuend.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
double |
evaluate(EvaluableVariableAssignment variableAssignments)
Calculates this expression’s value for the given
variableAssignments . |
EvaluableExpression |
getMinuend()
Get the
EvaluableExpression which is the minuend. |
EvaluableExpression |
getSubtrahend()
Get the
EvaluableExpression which is the subtrahend. |
int |
hashCode() |
void |
receive(EvaluableExpressionVisitor visitor)
Calls the appropriate overload of
EvaluableExpressionVisitor.visit(de.uka.ipd.sdq.beagle.core.evaluableexpressions.AdditionExpression) on
visitor . |
String |
toString() |
public SubtractionExpression(EvaluableExpression minuend, EvaluableExpression subtrahend)
subtrahend
- The subtrahend of the expression. Must not be null
.minuend
- The minuend of the expression. Must not be null
.public EvaluableExpression getSubtrahend()
EvaluableExpression
which is the subtrahend.public EvaluableExpression getMinuend()
EvaluableExpression
which is the minuend.public void receive(EvaluableExpressionVisitor visitor)
EvaluableExpression
EvaluableExpressionVisitor.visit(de.uka.ipd.sdq.beagle.core.evaluableexpressions.AdditionExpression)
on
visitor
. This implements the well-known visitor pattern.receive
in interface EvaluableExpression
visitor
- The visitor wishing to visit this expression.public double evaluate(EvaluableVariableAssignment variableAssignments)
EvaluableExpression
variableAssignments
.evaluate
in interface EvaluableExpression
variableAssignments
- must assign a value to at least all
EvaluableVariable
s contained in this expression.