hudson.plugins.jacoco.model
Class Coverage

java.lang.Object
  extended by hudson.plugins.jacoco.model.Coverage
All Implemented Interfaces:
Serializable

@ExportedBean
public final class Coverage
extends Object
implements Serializable

Represents x/y where x=missed and y=covered.

Author:
Kohsuke Kawaguchi, Jonathan Fuerth
See Also:
Serialized Form

Constructor Summary
Coverage()
           
Coverage(int missed, int covered)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Coverage

public Coverage(int missed,
                int covered)

Coverage

public Coverage()
Method Detail

getMissed

public int getMissed()

getCovered

public int getCovered()

getTotal

public int getTotal()

toString

public String toString()
Gets "missed/covered (%)" representation.

Overrides:
toString in class Object

getPercentage

@Exported
public int getPercentage()
Gets the percentage as an integer between 0 and 100.


getPercentageFloat

@Exported
public float getPercentageFloat()
Gets the percentage as a float between 0f and 100f.


getType

public CoverageElement.Type getType()

setType

public void setType(CoverageElement.Type type)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

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()


Copyright © 2004-2014 Hudson. All Rights Reserved.