01: package biz.hammurapi.metrics;
02:
03: import java.io.Serializable;
04:
05: import biz.hammurapi.metrics.Metric.Measurement;
06:
07: /**
08: * Measurement serializable value object.
09: * @author Pavel
10: */
11: public class SimpleMeasurement implements Measurement, Serializable {
12:
13: private long time;
14: private double value;
15:
16: public SimpleMeasurement(long time, double value) {
17: this .time = time;
18: this .value = value;
19: }
20:
21: public SimpleMeasurement(Measurement master) {
22: this .time = master.getTime();
23: this .value = master.getValue();
24: }
25:
26: public long getTime() {
27: return time;
28: }
29:
30: public double getValue() {
31: return value;
32: }
33:
34: }
|