public abstract class ScalarOperation extends AbstractProcedure
Constructor and Description |
---|
ScalarOperation() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
calculateValue(ModelElement element,
ExpressionNode node,
Variables vars)
Calculates the value for the scalar operation.
|
protected float |
getFloatValue(ModelElement element,
ExpressionNode node,
Variables vars)
Evaluates an expression that yields a float value.
|
protected float |
getFloatValue(java.lang.Object value,
ModelElement element)
Converts a number value to float.
|
evalBooleanExpression, evalElementSetExpression, evalExpression, evalSetExpression, getFilterAttributeProcessor, getMetaModel, getMetricsEngine, getModel, getRelationOrSet, isCompatible
public abstract java.lang.Object calculateValue(ModelElement element, ExpressionNode node, Variables vars) throws SDMetricsException
element
- Model element for which to calculate the operationnode
- The expression node with the operands for the scalar
operation.vars
- The variables for the calculation.SDMetricsException
- Problems while calculating the operation
value.protected float getFloatValue(ModelElement element, ExpressionNode node, Variables vars) throws SDMetricsException
element
- The model element to evaluate the expression for.node
- Root node of the expression to evaluatevars
- Variables for the expression evaluationSDMetricsException
- Problems while evaluating the expression.protected float getFloatValue(java.lang.Object value, ModelElement element) throws SDMetricsException
value
- Value to convert (must be an instance of
java.lang.Number
).element
- Model element for which to calculate the operationSDMetricsException
- Value is not a number