public class RangeDistributionBuilder extends 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(Number[] bottomLimits)
RangeDistributionBuilder for a defined range
Each entry is initialized at zero
|
Modifier and Type | Method and Description |
---|---|
RangeDistributionBuilder |
add(Number value)
Increments an entry by 1
|
RangeDistributionBuilder |
add(Number value,
int count)
Increments an entry
|
RangeDistributionBuilder |
add(String data)
Adds an existing Distribution to the current one.
|
String |
build()
Used to build a measure from the current object
|
boolean |
isEmpty() |
public RangeDistributionBuilder()
public RangeDistributionBuilder(Number[] bottomLimits)
bottomLimits
- the bottom limits of ranges to be usedpublic RangeDistributionBuilder add(Number value)
value
- the value to use to pick the entry to incrementpublic RangeDistributionBuilder add(Number value, int count)
value
- the value to use to pick the entry to incrementcount
- the number by which to incrementpublic RangeDistributionBuilder add(String data)
data
- the data to add to the current onepublic boolean isEmpty()
@CheckForNull public String build()
Copyright © 2009–2016 SonarSource. All rights reserved.