01: /**
02: * Created on Aug 28, 2002
03: */package org.acm.seguin.pmd.stat;
04:
05: /**
06: * @author David Dixon-Peugh
07: *
08: * This class holds all sorts of statistical information.
09: */
10: public class Metric {
11: private String metricName = null;
12: private int count = 0;
13: private double total = 0.0;
14: private double low = -1.0;
15: private double high = -1.0;
16: private double mean = -1.0;
17: private double stddev = -1.0;
18:
19: public Metric(String name, int count, double total, double low,
20: double high, double mean, double stddev) {
21: this .metricName = name;
22: this .low = low;
23: this .high = high;
24: this .mean = mean;
25: this .stddev = stddev;
26: this .count = count;
27: this .total = total;
28: }
29:
30: public String getMetricName() {
31: return metricName;
32: }
33:
34: public double getLowValue() {
35: return low;
36: }
37:
38: public double getHighValue() {
39: return high;
40: }
41:
42: public double getAverage() {
43: return mean;
44: }
45:
46: public double getStandardDeviation() {
47: return stddev;
48: }
49:
50: public int getCount() {
51: return count;
52: }
53:
54: public double getTotal() {
55: return total;
56: }
57: }
|