public class ComparisonExpression extends Object implements EvaluableExpression
FALSE
Constructor and Description |
---|
ComparisonExpression(EvaluableExpression smaller,
EvaluableExpression greater)
Builds an expression that will return '1' if the expression set as smaller is
smaller and '0' else.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
double |
evaluate(EvaluableVariableAssignment variableAssignments)
Calculates this expression’s value for the given
variableAssignments . |
EvaluableExpression |
getGreater()
Get the
EvaluableExpression which is supposed to be the greater one in the
comparison. |
EvaluableExpression |
getSmaller()
Get the
EvaluableExpression which is supposed to be the smaller one in the
comparison. |
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 ComparisonExpression(EvaluableExpression smaller, EvaluableExpression greater)
smaller
- The EvaluableExpression
which is supposed to be the smaller
one in the comparison.greater
- The EvaluableExpression
which is supposed to be the greater
one in the comparison.public EvaluableExpression getGreater()
EvaluableExpression
which is supposed to be the greater one in the
comparison.
For example: if e1 < e2
should be expressed, e1
is set as
smaller and e2
as greater expression.
public EvaluableExpression getSmaller()
EvaluableExpression
which is supposed to be the smaller one in the
comparison.
For example: if e1 < e2
should be expressed, e1
is set as
smaller and e2
as greater expression.
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.