Package hudson.plugins.jacoco.model
Class Coverage
- java.lang.Object
 - 
- hudson.plugins.jacoco.model.Coverage
 
 
- 
- All Implemented Interfaces:
 Serializable
@ExportedBean public final class Coverage extends Object implements Serializable
Representsx/ywhere x=missedand y=covered.- Author:
 - Kohsuke Kawaguchi, Jonathan Fuerth
 - See Also:
 - Serialized Form
 
 
- 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccumulate(int missed, int covered)Adds the given missed and covered values to the ones already contained in this ratio.voidaccumulatePP(int missed, int covered)booleanequals(Object o)intgetCovered()intgetMissed()intgetPercentage()Gets the percentage as an integer between 0 and 100.floatgetPercentageFloat()Gets the percentage as a float between 0f and 100f.intgetTotal()CoverageElement.TypegetType()inthashCode()booleanisInitialized()voidsetType(CoverageElement.Type type)StringtoString()Gets "missed/covered (%)" representation. 
 - 
 
- 
- 
Method Detail
- 
getMissed
@Exported public int getMissed()
 
- 
getCovered
@Exported public int getCovered()
 
- 
getTotal
@Exported public int getTotal()
 
- 
toString
public String toString()
Gets "missed/covered (%)" representation. 
- 
getPercentage
@Exported public int getPercentage()
Gets the percentage as an integer between 0 and 100.- Returns:
 - the coverage percentage as a rounded integer between 0 and 100.
 - See Also:
 getPercentageFloat()
 
- 
getPercentageFloat
@Exported public float getPercentageFloat()
Gets the percentage as a float between 0f and 100f.- Returns:
 - the coverage percentage as a float between 0f and 100f. returns 100f if no coverage data was recorded at all, i.e. covered and missed are zero
 - See Also:
 getPercentage()
 
- 
getType
public CoverageElement.Type getType()
 
- 
setType
public void setType(CoverageElement.Type type)
 
- 
accumulate
public void accumulate(int missed, int covered)Adds the given missed and covered values to the ones already contained in this ratio.- Parameters:
 missed- The amount to add to the missed.covered- The amount to add to the covered.
 
- 
accumulatePP
public void accumulatePP(int missed, int covered) 
- 
isInitialized
public boolean isInitialized()
 
 - 
 
 -