public class RangeDistributionBuilder
extends java.lang.Object
An example of usage : you wish to record the percentage of lines of code that belong to method with pre-defined ranges of complexity.
| Constructor and Description |
|---|
RangeDistributionBuilder() |
RangeDistributionBuilder(java.lang.Number[] bottomLimits)
RangeDistributionBuilder for a defined range
Each entry is initialized at zero
|
| Modifier and Type | Method and Description |
|---|---|
RangeDistributionBuilder |
add(java.lang.Number value)
Increments an entry by 1
|
RangeDistributionBuilder |
add(java.lang.Number value,
int count)
Increments an entry
|
RangeDistributionBuilder |
add(java.lang.String data)
Adds an existing Distribution to the current one.
|
java.lang.String |
build()
Used to build a measure from the current object
|
boolean |
isEmpty() |
public RangeDistributionBuilder()
public RangeDistributionBuilder(java.lang.Number[] bottomLimits)
bottomLimits - the bottom limits of ranges to be usedpublic RangeDistributionBuilder add(java.lang.Number value)
value - the value to use to pick the entry to incrementpublic RangeDistributionBuilder add(java.lang.Number value, int count)
value - the value to use to pick the entry to incrementcount - the number by which to incrementpublic RangeDistributionBuilder add(java.lang.String data)
data - the data to add to the current onepublic boolean isEmpty()
@CheckForNull public java.lang.String build()