instead
@Deprecated public class RangeDistributionBuilder extends java.lang.Object implements MeasureBuilder
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(Metric<java.lang.String> metric)
Deprecated.
|
RangeDistributionBuilder(Metric<java.lang.String> metric,
java.lang.Number[] bottomLimits)
Deprecated.
RangeDistributionBuilder for a metric and a defined range
Each entry is initialized at zero
|
Modifier and Type | Method and Description |
---|---|
RangeDistributionBuilder |
add(Measure<java.lang.String> measure)
Deprecated.
Adds an existing Distribution to the current one.
|
RangeDistributionBuilder |
add(java.lang.Number value)
Deprecated.
Increments an entry by 1
|
RangeDistributionBuilder |
add(java.lang.Number value,
int count)
Deprecated.
Increments an entry
|
Measure<java.lang.String> |
build()
Deprecated.
Shortcut for
build(true) |
Measure<java.lang.String> |
build(boolean allowEmptyData)
Deprecated.
Used to build a measure from the current object
|
RangeDistributionBuilder |
clear()
Deprecated.
Resets all entries to zero
|
java.lang.Number[] |
getBottomLimits()
Deprecated.
Gives the bottom limits of ranges used
|
boolean |
isEmpty()
Deprecated.
|
public RangeDistributionBuilder(Metric<java.lang.String> metric, java.lang.Number[] bottomLimits)
metric
- the metric to record the measure againstbottomLimits
- the bottom limits of ranges to be usedpublic RangeDistributionBuilder(Metric<java.lang.String> metric)
public java.lang.Number[] getBottomLimits()
public RangeDistributionBuilder add(java.lang.Number value)
value
- the value to use to pick the entry to incrementpublic RangeDistributionBuilder add(@Nullable 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(@Nullable Measure<java.lang.String> measure)
measure
- the measure to add to the current onepublic RangeDistributionBuilder clear()
public boolean isEmpty()
public Measure<java.lang.String> build()
build(true)
build
in interface MeasureBuilder
public Measure<java.lang.String> build(boolean allowEmptyData)
allowEmptyData
- should be built if current object is empty