org.jacoco.core.analysis
Interface ICounter

All Known Subinterfaces:
ILines
All Known Implementing Classes:
AbstractCounter, CounterImpl, LinesImpl

public interface ICounter

A counter holds the total and the covered number of particular items like classes, methods, blocks or instructions. Counters provide canonical comparison of their covered/total ratios.

Version:
$Revision: 11 $
Author:
Marc R. Hoffmann

Method Summary
 int getCoveredCount()
          Returns the total count of covered items.
 double getCoveredRatio()
          Calculates the ratio of covered to total count items.
 int getNotCoveredCount()
          Returns the total count of items not covered.
 double getNotCoveredRatio()
          Calculates the ratio of not covered to total count items.
 int getTotalCount()
          Returns the total count of instrumented items.
 

Method Detail

getTotalCount

int getTotalCount()
Returns the total count of instrumented items.

Returns:
total count of instrumented items

getCoveredCount

int getCoveredCount()
Returns the total count of covered items.

Returns:
total count of covered items

getNotCoveredCount

int getNotCoveredCount()
Returns the total count of items not covered.

Returns:
total count of items not covered

getCoveredRatio

double getCoveredRatio()
Calculates the ratio of covered to total count items. If total count items is 0 this method returns NaN.

Returns:
ratio of covered to total count items

getNotCoveredRatio

double getNotCoveredRatio()
Calculates the ratio of not covered to total count items. If total count items is 0 this method returns NaN.

Returns:
ratio of not covered to total count items