|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jacoco.core.internal.analysis.CounterImpl
public abstract class CounterImpl
ICounter implementations. Implementing a factory pattern allows to
share counter instances.
| Field Summary | |
|---|---|
static CounterImpl |
COUNTER_0_0
Constant for Counter with 0/0 values. |
static CounterImpl |
COUNTER_0_1
Constant for Counter with 0/1 values. |
static CounterImpl |
COUNTER_1_0
Constant for Counter with 1/0 values. |
protected int |
covered
number of covered items |
protected int |
missed
number of missed items |
| Fields inherited from interface org.jacoco.core.analysis.ICounter |
|---|
EMPTY, FULLY_COVERED, NOT_COVERED, PARTLY_COVERED |
| Constructor Summary | |
|---|---|
protected |
CounterImpl(int missed,
int covered)
Creates a new instance with the given numbers. |
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
int |
getCoveredCount()
Returns the count of covered items. |
double |
getCoveredRatio()
Calculates the ratio of covered to total count items. |
static CounterImpl |
getInstance(ICounter counter)
Factory method to retrieve a clone of the given counter. |
static CounterImpl |
getInstance(int missed,
int covered)
Factory method to retrieve a counter with the given number of items. |
int |
getMissedCount()
Returns the count of missed items. |
double |
getMissedRatio()
Calculates the ratio of missed to total count items. |
int |
getStatus()
Returns the coverage status of this counter. |
int |
getTotalCount()
Returns the total count of items. |
int |
hashCode()
|
CounterImpl |
increment(ICounter counter)
Returns a counter with values incremented by the numbers of the given counter. |
abstract CounterImpl |
increment(int missed,
int covered)
Returns a counter with values incremented by the given numbers. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final CounterImpl COUNTER_0_0
public static final CounterImpl COUNTER_1_0
public static final CounterImpl COUNTER_0_1
protected int missed
protected int covered
| Constructor Detail |
|---|
protected CounterImpl(int missed,
int covered)
missed - number of missed itemscovered - number of covered items| Method Detail |
|---|
public static CounterImpl getInstance(int missed,
int covered)
missed - number of missed itemscovered - number of covered items
public static CounterImpl getInstance(ICounter counter)
counter - counter to copy
public CounterImpl increment(ICounter counter)
counter - number of additional total and covered items
public abstract CounterImpl increment(int missed,
int covered)
missed - number of missed itemscovered - number of covered items
public int getTotalCount()
ICounter
getTotalCount in interface ICounterpublic int getCoveredCount()
ICounter
getCoveredCount in interface ICounterpublic int getMissedCount()
ICounter
getMissedCount in interface ICounterpublic double getCoveredRatio()
ICounter
getCoveredRatio in interface ICounterpublic double getMissedRatio()
ICounter
getMissedRatio in interface ICounterpublic int getStatus()
ICounter
getStatus in interface ICounterICounter.EMPTY,
ICounter.NOT_COVERED,
ICounter.PARTLY_COVERED,
ICounter.FULLY_COVEREDpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||