org.gmetrics.metric.abc.result
Class AggregateAbcMetricResult
java.lang.Object
org.gmetrics.metric.abc.result.AggregateAbcMetricResult
- All Implemented Interfaces:
- groovy.lang.GroovyObject, MetricResult
public class AggregateAbcMetricResult
- extends java.lang.Object
- implements groovy.lang.GroovyObject, MetricResult
An aggregate MetricResult implementation specifically for the ABC Metric.
- Version:
- $Revision: 24 $ - $Date: 2009-12-10 21:17:05 -0500 (Thu, 10 Dec 2009) $
- Author:
- Chris Mair
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AggregateAbcMetricResult
public AggregateAbcMetricResult(Metric metric,
java.util.Collection children)
getMetric
public final Metric getMetric()
- Specified by:
getMetric in interface MetricResult
getValue
public final java.lang.Object getValue()
getCount
public int getCount()
- Specified by:
getCount in interface MetricResult
getTotalAbcVector
public java.lang.Object getTotalAbcVector()
- Return the sum of this set of ABC vectors. Each component (A,B,C) of the result
is summed separately. The formula for each component is:
A1 + A2 + .. AN
and likewise for B and C values.
getAbcVector
public java.lang.Object getAbcVector()
getAverageAbcVector
public java.lang.Object getAverageAbcVector()
- Return the average of this set of ABC vectors. Each component (A,B,C) of the result
is calculated and averaged separately. The formula for each component is:
(A1 + A2 + .. AN) / N
and likewise for B and C values. Each component of the result vector is rounded down to an integer.
getTotal
public java.lang.Object getTotal()
- Specified by:
getTotal in interface MetricResult
- Returns:
- the magnitude of the sum of the set of ABC vectors; i.e., getTotalAbcVector().getMagnitude().
getAverage
public java.lang.Object getAverage()
- Specified by:
getAverage in interface MetricResult
- Returns:
- the magnitude of the average of the set of ABC vectors; i.e., getAverageAbcVector().getMagnitude().
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getMetaClass
public groovy.lang.MetaClass getMetaClass()
- Specified by:
getMetaClass in interface groovy.lang.GroovyObject
setMetaClass
public void setMetaClass(groovy.lang.MetaClass metaClass)
- Specified by:
setMetaClass in interface groovy.lang.GroovyObject
invokeMethod
public java.lang.Object invokeMethod(java.lang.String name,
java.lang.Object args)
- Specified by:
invokeMethod in interface groovy.lang.GroovyObject
getProperty
public java.lang.Object getProperty(java.lang.String name)
- Specified by:
getProperty in interface groovy.lang.GroovyObject
setProperty
public void setProperty(java.lang.String name,
java.lang.Object value)
- Specified by:
setProperty in interface groovy.lang.GroovyObject
Copyright © 2010. All Rights Reserved.