public class AverageFormula extends Object implements Formula
Modifier and Type | Method and Description |
---|---|
Measure |
calculate(FormulaData data,
FormulaContext context) |
static AverageFormula |
create(Metric main,
Metric by)
Creates a new
AverageFormula class. |
List<Metric> |
dependsUponMetrics() |
public static AverageFormula create(Metric main, Metric by)
AverageFormula
class.main
- The metric on which average should be calculated (ex.: "complexity")by
- The metric used to divide the main metric to compute average (ex.: "file" for "complexity by file")public List<Metric> dependsUponMetrics()
dependsUponMetrics
in interface Formula
public Measure calculate(FormulaData data, FormulaContext context)
Copyright © 2009-2012 SonarSource. All Rights Reserved.