@Deprecated public class CountDistributionBuilder extends Object implements MeasureBuilder
An example of usage : you wish to record the number of violations for each level of rules priority
| Constructor and Description | 
|---|
| CountDistributionBuilder(Metric metric)Deprecated.  Creates an empty CountDistributionBuilder for a specified metric | 
| Modifier and Type | Method and Description | 
|---|---|
| CountDistributionBuilder | add(Measure measure)Deprecated.  Adds an existing Distribution to the current one. | 
| CountDistributionBuilder | add(Object value)Deprecated.  Increments an entry by one | 
| CountDistributionBuilder | add(Object value,
   int count)Deprecated.  Increments an entry | 
| CountDistributionBuilder | addZero(Object value)Deprecated.  Adds an entry without a zero count if it does not exist | 
| Measure | build()Deprecated.  Shortcut for  build(true) | 
| Measure | build(boolean allowEmptyData)Deprecated.  Used to build a measure from the current object | 
| CountDistributionBuilder | clear()Deprecated.  Resets all entries to zero | 
| boolean | isEmpty()Deprecated.  | 
public CountDistributionBuilder(Metric metric)
metric - the metricpublic CountDistributionBuilder add(Object value, int count)
value - the value that should be incrementedcount - the number by which to incrementpublic CountDistributionBuilder add(Object value)
value - the value that should be incrementedpublic CountDistributionBuilder addZero(Object value)
value - the entry to be addedpublic CountDistributionBuilder add(Measure measure)
measure - the measure to add to the current onepublic boolean isEmpty()
public CountDistributionBuilder clear()
public Measure build()
build(true)build in interface MeasureBuilderCopyright © 2009–2016 SonarSource. All rights reserved.