org.gmetrics.metric.abc
Class AbcVector

java.lang.Object
  extended by org.gmetrics.metric.abc.AbcVector
All Implemented Interfaces:
groovy.lang.GroovyObject

public class AbcVector
extends java.lang.Object
implements groovy.lang.GroovyObject

Represents a single ABC Metric result: a vector of the three A, B, C values.

Version:
$Revision: 101 $ - $Date: 2010-03-10 19:17:23 -0500 (Wed, 10 Mar 2010) $
Author:
Chris Mair

Constructor Summary
AbcVector(int assignments, int branches, int conditions)
           
 
Method Summary
 int getAssignments()
           
 int getBranches()
           
 int getConditions()
           
 java.math.BigDecimal getMagnitude()
          Return the magnitude of this ABC vector, specifically: |ABC| = sqrt((A*A)+(B*B)+(C*C))
 groovy.lang.MetaClass getMetaClass()
           
 java.lang.Object getProperty(java.lang.String name)
           
 java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
           
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbcVector

public AbcVector(int assignments,
                 int branches,
                 int conditions)
Method Detail

getAssignments

public final int getAssignments()

getBranches

public final int getBranches()

getConditions

public final int getConditions()

getMagnitude

public java.math.BigDecimal getMagnitude()
Return the magnitude of this ABC vector, specifically: |ABC| = sqrt((A*A)+(B*B)+(C*C))

Returns:
the magnitude of the ABC vector as a BigDecimal with scale of 1

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.