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