View Javadoc

1   package net.sourceforge.pmd.lang.rule.stat;
2   
3   import net.sourceforge.pmd.Rule;
4   import net.sourceforge.pmd.lang.rule.properties.DoubleProperty;
5   import net.sourceforge.pmd.lang.rule.properties.IntegerProperty;
6   import net.sourceforge.pmd.stat.DataPoint;
7   
8   /**
9    * This interface tags a Rule as being a Statistical rule, producing various
10   * metrics from data points.
11   * 
12   * @see DataPoint
13   * @see Metric
14   * @see StatisticalRuleHelper
15   */
16  public interface StatisticalRule extends Rule {
17  
18      DoubleProperty SIGMA_DESCRIPTOR = new DoubleProperty("sigma", "Sigma value", 0d, 100d, null, 1.0f);
19      DoubleProperty MINIMUM_DESCRIPTOR = new DoubleProperty("minimum", "Minimum reporting threshold", 0d, 100d, null, 2.0f);
20      IntegerProperty TOP_SCORE_DESCRIPTOR = new IntegerProperty("topscore", "Top score value", 1, 100, null, 3.0f);
21  
22      void addDataPoint(DataPoint point);
23      Object[] getViolationParameters(DataPoint point);
24  }