public class IfThenElseExpression extends Object implements EvaluableExpression
FALSE| Constructor and Description |
|---|
IfThenElseExpression(EvaluableExpression ifStatement,
EvaluableExpression thenStatement,
EvaluableExpression elseStatement)
Builds an expression which returns .
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
double |
evaluate(EvaluableVariableAssignment variableAssignments)
Calculates this expression’s value for the given
variableAssignments. |
EvaluableExpression |
getElseStatement()
Get expression contained in else-statement.
|
EvaluableExpression |
getIfStatement()
Get expression contained in if-statement.
|
EvaluableExpression |
getThenStatement()
Get expression contained in then-statement.
|
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 IfThenElseExpression(EvaluableExpression ifStatement, EvaluableExpression thenStatement, EvaluableExpression elseStatement)
ifStatement - The expression which contains the if-statement. Must not be
null.thenStatement - The expression which contains the then-statement. Must not be
null.elseStatement - The expression which contains the else-statement. Must not be
null.public EvaluableExpression getIfStatement()
public EvaluableExpression getElseStatement()
public EvaluableExpression getThenStatement()
public void receive(EvaluableExpressionVisitor visitor)
EvaluableExpressionEvaluableExpressionVisitor.visit(de.uka.ipd.sdq.beagle.core.evaluableexpressions.AdditionExpression) on
visitor. This implements the well-known visitor pattern.receive in interface EvaluableExpressionvisitor - The visitor wishing to visit this expression.public double evaluate(EvaluableVariableAssignment variableAssignments)
EvaluableExpressionvariableAssignments.evaluate in interface EvaluableExpressionvariableAssignments - must assign a value to at least all
EvaluableVariables contained in this expression.