www.sdmetrics.com

com.sdmetrics.metrics
Class MetricProcedure

java.lang.Object
  extended by com.sdmetrics.metrics.AbstractProcedure
      extended by com.sdmetrics.metrics.MetricProcedure
Direct Known Subclasses:
MetricProcedureAttributeValue, MetricProcedureCompare, MetricProcedureCompound, MetricProcedureConnectedComponents, MetricProcedureCount, MetricProcedureFilterValue, MetricProcedureNesting, MetricProcedureProjection, MetricProcedureSetOperation, MetricProcedureSignature, MetricProcedureSubelements, MetricProcedureSubString, MetricProcedureValuesetOperation

public abstract class MetricProcedure
extends AbstractProcedure

Base class for all metric procedures.


Constructor Summary
MetricProcedure()
           
 
Method Summary
protected abstract  java.lang.Object calculate(ModelElement element, Metric metric)
          Calculates the metric procedure.
 
Methods inherited from class com.sdmetrics.metrics.AbstractProcedure
evalBooleanExpression, evalElementSetExpression, evalExpression, evalSetExpression, getFilterAttributeProcessor, getMetaModel, getMetricsEngine, getModel, getRelationOrSet, isCompatible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetricProcedure

public MetricProcedure()
Method Detail

calculate

protected abstract java.lang.Object calculate(ModelElement element,
                                              Metric metric)
                                       throws SDMetricsException
Calculates the metric procedure.

Parameters:
element - The model element for which to calculate the procedure.
metric - The metric to calculate.
Returns:
Value of the metric. This should be an Integer, a Float, a String, or a model element.
Throws:
SDMetricsException - Problem during the calculation of the metric.

www.sdmetrics.com