1
2
3
4 package net.sourceforge.pmd.stat;
5
6
7
8
9
10
11 public class Metric {
12 private String metricName = null;
13 private int count = 0;
14 private double total = 0.0;
15 private double low = -1.0;
16 private double high = -1.0;
17 private double mean = -1.0;
18 private double stddev = -1.0;
19
20
21
22
23
24
25
26
27
28
29
30 public Metric(String name, int count, double total, double low, double high, double mean, double stddev) {
31 this.metricName = name;
32 this.low = low;
33 this.high = high;
34 this.mean = mean;
35 this.stddev = stddev;
36 this.count = count;
37 this.total = total;
38 }
39
40 public String getMetricName() {
41 return metricName;
42 }
43
44 public double getLowValue() {
45 return low;
46 }
47
48 public double getHighValue() {
49 return high;
50 }
51
52 public double getAverage() {
53 return mean;
54 }
55
56 public double getStandardDeviation() {
57 return stddev;
58 }
59
60 public int getCount() {
61 return count;
62 }
63
64 public double getTotal() {
65 return total;
66 }
67 }