www.sdmetrics.com

com.sdmetrics.metrics
Class SetSummationHelper

java.lang.Object
  extended by com.sdmetrics.metrics.SetSummationHelper

public class SetSummationHelper
extends java.lang.Object

Helps set calculation procedures to build up their cumulative result sets.


Constructor Summary
SetSummationHelper(MetricsEngine engine, Set set, java.lang.String setAttributeName)
           
 
Method Summary
 void add(java.util.Collection<?> c)
          Adds the contents of a collection to the result set.
 void add(ModelElement element, Variables vars)
          Processes the cumulative or valueset expression for a model element and adds its contents to the result set.
 void excludeSelf(ModelElement element)
          Removes a model element from the result set if the "exclude_self" attribute is set to true.
 java.util.Collection<?> getResultSet()
          Gets the result set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetSummationHelper

public SetSummationHelper(MetricsEngine engine,
                          Set set,
                          java.lang.String setAttributeName)
                   throws SDMetricsException
Parameters:
engine - metrics engine for expression evaluation
set - The definition of the set to process
setAttributeName - The name of the attribute defining the sets to accumulate.
Throws:
SDMetricsException - Summation attributes have illegal values
Method Detail

add

public void add(ModelElement element,
                Variables vars)
         throws SDMetricsException
Processes the cumulative or valueset expression for a model element and adds its contents to the result set.

Parameters:
element - The model element to process.
vars - Variables for the evaluation of expressions
Throws:
SDMetricsException - An error occurred evaluating the set expressions.

add

public void add(java.util.Collection<?> c)
Adds the contents of a collection to the result set.

Parameters:
c - Collection to add.

excludeSelf

public void excludeSelf(ModelElement element)
Removes a model element from the result set if the "exclude_self" attribute is set to true. If not, calling this method has no effect.

Parameters:
element - Element to remove.

getResultSet

public java.util.Collection<?> getResultSet()
Gets the result set.

Returns:
The current result set.

www.sdmetrics.com