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/y
where x=missed
and y=covered
.- Author:
- Kohsuke Kawaguchi, Jonathan Fuerth
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accumulate(int missed, int covered)
Adds the given missed and covered values to the ones already contained in this ratio.void
accumulatePP(int missed, int covered)
boolean
equals(Object o)
int
getCovered()
int
getMissed()
int
getPercentage()
Gets the percentage as an integer between 0 and 100.float
getPercentageFloat()
Gets the percentage as a float between 0f and 100f.int
getTotal()
CoverageElement.Type
getType()
int
hashCode()
boolean
isInitialized()
void
setType(CoverageElement.Type type)
String
toString()
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()
-
-