public class MultiplicationExpression extends Object implements EvaluableExpression
FALSE
Constructor and Description |
---|
MultiplicationExpression(Collection<EvaluableExpression> factors)
Builds an expression that will return the product of all
factors on
evaluation. |
MultiplicationExpression(EvaluableExpression... factors)
Builds an expression that will return the sum of all
factors 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> |
getFactors()
Gets all factors (expressions that will be multiplied on evaluation).
|
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 MultiplicationExpression(Collection<EvaluableExpression> factors)
factors
on
evaluation.factors
- The factors forming this expression’s product.
factors.size()
must at least be 2.public MultiplicationExpression(EvaluableExpression... factors)
factors
on evaluation.factors
- The factors forming this expression’s product.
factors.length
must at least be 2.public Collection<EvaluableExpression> getFactors()
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.