public class AdditionExpression extends Object implements EvaluableExpression
FALSE
Constructor and Description |
---|
AdditionExpression(Collection<EvaluableExpression> summands)
Builds an expression that will return the sum of all
summands on
evaluation. |
AdditionExpression(EvaluableExpression... summands)
Builds an expression that will return the sum of all
summands on
evaluation. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
double |
evaluate(EvaluableVariableAssignment variableAssignments)
Calculates this expression’s value for the given
variableAssignments . |
Collection<EvaluableExpression> |
getSummands()
Get all evaluable expressions which are forming this expression's sum.
|
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 AdditionExpression(Collection<EvaluableExpression> summands)
summands
on
evaluation.summands
- The summands forming this expression’s sum. summands.size()
must at least be 2.public AdditionExpression(EvaluableExpression... summands)
summands
on
evaluation.summands
- The summands forming this expression’s sum. summands.length
must at least be 2.public Collection<EvaluableExpression> getSummands()
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.