net.sourceforge.cobertura.coveragedata
public abstract class CoverageDataContainer extends Object implements CoverageData, HasBeenInstrumented, Serializable
Coverage data information is typically serialized to a file.
This class implements HasBeenInstrumented so that when cobertura instruments itself, it will omit this class. It does this to avoid an infinite recursion problem because instrumented classes make use of this class.
Field Summary | |
---|---|
Map | children
Each key is the name of a child, usually stored as a String or
an Integer object. |
static long | serialVersionUID |
Method Summary | |
---|---|
boolean | equals(Object obj)
Determine if this CoverageDataContainer is equal to
another one. |
double | getBranchCoverageRate() |
CoverageData | getChild(String name)
Get a child from this container with the specified
key. |
double | getLineCoverageRate() |
int | getNumberOfChildren() |
int | getNumberOfCoveredBranches() |
int | getNumberOfCoveredLines() |
int | getNumberOfValidBranches() |
int | getNumberOfValidLines() |
int | hashCode()
It is highly recommended that classes extending this
class override this hashCode method and generate a more
effective hash code. |
void | merge(CoverageData coverageData)
Merge two CoverageDataContainer s.
|
Parameters: obj An object to test for equality.
Returns: True if the objects are equal.
Returns: The average branch coverage rate for all children in this container.
Parameters: name The key used to lookup the child in the map.
Returns: The child object, if found, or null if not found.
Returns: The average line coverage rate for all children in this container. This number will be a decimal between 0 and 1, inclusive.
Returns: The number of children in this container.
CoverageDataContainer
s.
Parameters: coverageData The container to merge into this one.