public class DivisionExpression extends Object implements EvaluableExpression
FALSE
Constructor and Description |
---|
DivisionExpression(EvaluableExpression dividend,
EvaluableExpression divisor)
Builds an expression which returns the quotient of a division using the given
divisor and dividend.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
double |
evaluate(EvaluableVariableAssignment variableAssignments)
Calculates this expression’s value for the given
variableAssignments . |
EvaluableExpression |
getDividend()
Gets the dividend of the expression.
|
EvaluableExpression |
getDivisor()
Gets the divisor of the expression.
|
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 DivisionExpression(EvaluableExpression dividend, EvaluableExpression divisor)
dividend
- The expression being divided.divisor
- The expression dividing the other one.public EvaluableExpression getDivisor()
public EvaluableExpression getDividend()
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.