public class SummationHelper
extends java.lang.Object
| Constructor and Description | 
|---|
| SummationHelper(MetricsEngine engine,
               ProcedureAttributes attributes)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | add(float value)Adds a value to the current total. | 
| void | add(ModelElement element,
   Variables vars)Processes the "sum" and "stat" attributes for a model element and updates
 the total accordingly. | 
| java.lang.Number | getTotal()Gets the current total. | 
| void | raiseTo(float value)Raises the total to a specified value if it currently is below that
 value. | 
public SummationHelper(MetricsEngine engine, ProcedureAttributes attributes) throws SDMetricsException
engine - metrics engine for expression evaluationattributes - Attributes of the calculation procedure to process.SDMetricsException - That "stat" attribute is invalidpublic void add(ModelElement element, Variables vars) throws SDMetricsException
element - The model element to process.vars - Variables for the evaluation of expressionsSDMetricsException - An error occurred evaluating the sum
         expression.public void add(float value)
value - Value to addpublic void raiseTo(float value)
value - new total value to raise topublic java.lang.Number getTotal()