public class BlockMetrics extends Object implements BlockMetrics
| Modifier and Type | Field and Description |
|---|---|
static float |
VALUE_UNDEFINED
Constant used to indicate that given metric cannot be calculated (for example statement
percentage coverage when code has 0 statements), so it's value is undefined.
|
| Constructor and Description |
|---|
BlockMetrics(HasMetrics owner) |
public static float VALUE_UNDEFINED
public BlockMetrics(HasMetrics owner)
public static boolean isUndefined(float value)
value - - value to be checkedVALUE_UNDEFINEDpublic HasMetrics getOwner()
getOwner in interface BlockMetricspublic void setOwner(HasMetrics owner)
public String getType()
getType in interface BlockMetricspublic int getNumStatements()
getNumStatements in interface BlockMetricspublic void addNumStatements(int numStatements)
public void setNumStatements(int numStatements)
public int getNumCoveredStatements()
getNumCoveredStatements in interface BlockMetricspublic void addNumCoveredStatements(int numCoveredStatements)
public void setNumCoveredStatements(int numCoveredStatements)
public int getNumBranches()
getNumBranches in interface BlockMetricspublic void addNumBranches(int numBranches)
public void setNumBranches(int numBranches)
public int getNumCoveredBranches()
getNumCoveredBranches in interface BlockMetricspublic void addNumCoveredBranches(int numCoveredBranches)
public void setNumCoveredBranches(int numCoveredBranches)
public int getComplexity()
getComplexity in interface BlockMetricspublic void addComplexity(int complexity)
public void setComplexity(int complexity)
public int getNumTests()
getNumTests in interface BlockMetricspublic void setNumTests(int numTests)
public int getNumTestPasses()
getNumTestPasses in interface BlockMetricspublic void setNumTestPasses(int numTestPasses)
public int getNumTestFailures()
getNumTestFailures in interface BlockMetricspublic void setNumTestFailures(int numTestFailures)
public int getNumTestErrors()
getNumTestErrors in interface BlockMetricspublic void setNumTestErrors(int numTestErrors)
public double getTestExecutionTime()
getTestExecutionTime in interface BlockMetricspublic void setTestExecutionTime(double testExecutionTime)
public int getNumElements()
getNumElements in interface BlockMetricspublic int getNumCoveredElements()
getNumCoveredElements in interface BlockMetricspublic int getNumUncoveredElements()
getNumUncoveredElements in interface BlockMetricspublic float getPcCoveredStatements()
getPcCoveredStatements in interface BlockMetricspublic float getPcCoveredBranches()
getPcCoveredBranches in interface BlockMetricspublic float getPcCoveredElements()
getPcCoveredElements in interface BlockMetricspublic float getPcUncoveredElements()
getPcUncoveredElements in interface BlockMetricspublic double getAvgTestExecutionTime()
getAvgTestExecutionTime in interface BlockMetricspublic float getPcTestPasses()
getPcTestPasses in interface BlockMetricspublic float getPcTestErrors()
getPcTestErrors in interface BlockMetricspublic float getPcTestFailures()
getPcTestFailures in interface BlockMetricspublic int getNumTestsRun()
getNumTestsRun in interface BlockMetricspublic float getPcTestPassesFailures()
getPcTestPassesFailures in interface BlockMetricspublic boolean isEmpty()
isEmpty in interface BlockMetricspublic float getComplexityDensity()
getComplexityDensity in interface BlockMetricspublic BlockMetrics add(BlockMetrics metrics)
protected double getFraction(double num,
int dem)
protected float getFraction(float num,
int dem)
Copyright © 2024 OpenClover.org. All rights reserved.