|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.measures.RangeDistributionBuilder
public class RangeDistributionBuilder
An utility to build a range distribution based on 2 criteria: one is measure, the other one is recorded.
An example of usage : you wish to save the number of lines that belong to methods that have complexity belonging to certain ranges.
Constructor Summary | |
---|---|
RangeDistributionBuilder(Metric metric,
Number[] bottomLimits)
RangeDistributionBuilder for a metric and a defined range |
Method Summary | |
---|---|
RangeDistributionBuilder |
add(Measure measure)
|
RangeDistributionBuilder |
add(Number object)
Add 1 to the range object belongs to |
RangeDistributionBuilder |
add(Number object,
int count)
|
Measure |
build()
|
Measure |
build(boolean allowEmptyData)
|
RangeDistributionBuilder |
clear()
|
Number[] |
getBottomLimits()
Gets the defined bottom limits |
boolean |
isEmpty()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RangeDistributionBuilder(Metric metric, Number[] bottomLimits)
metric
- the metric for the measure being builtbottomLimits
- the bottom limits for lookupMethod Detail |
---|
public Number[] getBottomLimits()
public RangeDistributionBuilder add(Number object)
object
- the Number to use to pick the range
public RangeDistributionBuilder add(Number object, int count)
public RangeDistributionBuilder add(Measure measure)
public RangeDistributionBuilder clear()
public boolean isEmpty()
public Measure build()
build
in interface MeasureBuilder
public Measure build(boolean allowEmptyData)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |