ICounter.CounterValue| Modifier and Type | Field | Description |
|---|---|---|
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
|
EMPTY, FULLY_COVERED, NOT_COVERED, PARTLY_COVERED| Modifier | Constructor | Description |
|---|---|---|
protected |
CounterImpl(int missed,
int covered) |
Creates a new instance with the given numbers.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object obj) |
|
int |
getCoveredCount() |
Returns the count of covered items.
|
double |
getCoveredRatio() |
Calculates the ratio of covered to total count items.
|
static CounterImpl |
getInstance(int missed,
int covered) |
Factory method to retrieve a counter with the given number of items.
|
static CounterImpl |
getInstance(ICounter counter) |
Factory method to retrieve a clone of the given counter.
|
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.
|
double |
getValue(ICounter.CounterValue value) |
Returns the counter value of the given type.
|
int |
hashCode() |
|
abstract CounterImpl |
increment(int missed,
int covered) |
Returns a counter with values incremented by the given numbers.
|
CounterImpl |
increment(ICounter counter) |
Returns a counter with values incremented by the numbers of the given
counter.
|
java.lang.String |
toString() |
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
protected CounterImpl(int missed,
int covered)
missed - number of missed itemscovered - number of covered itemspublic static CounterImpl getInstance(int missed, int covered)
missed - number of missed itemscovered - number of covered itemspublic static CounterImpl getInstance(ICounter counter)
counter - counter to copypublic CounterImpl increment(ICounter counter)
counter - number of additional total and covered itemspublic abstract CounterImpl increment(int missed, int covered)
missed - number of missed itemscovered - number of covered itemspublic double getValue(ICounter.CounterValue value)
ICounterpublic int getTotalCount()
ICountergetTotalCount in interface ICounterpublic int getCoveredCount()
ICountergetCoveredCount in interface ICounterpublic int getMissedCount()
ICountergetMissedCount in interface ICounterpublic double getCoveredRatio()
ICountergetCoveredRatio in interface ICounterpublic double getMissedRatio()
ICountergetMissedRatio in interface ICounterpublic int getStatus()
ICountergetStatus in interface ICounterICounter.EMPTY,
ICounter.NOT_COVERED,
ICounter.PARTLY_COVERED,
ICounter.FULLY_COVEREDpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All rights reserved.