public final class ConstantExpression extends Object implements EvaluableExpression
EvaluableExpression
having a constant value.FALSE
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
double |
evaluate(EvaluableVariableAssignment variableAssignments)
Calculates this expression’s value for the given
variableAssignments . |
static ConstantExpression |
forValue(double value)
Looks for the constant expression belonging to an input
value . |
double |
getValue()
Gets the value of this constant 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 double getValue()
public static ConstantExpression forValue(double value)
value
.value
- The value whose expression should be returned.value
.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.