1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package net.sf.statcvs.reportmodel;
24
25 import java.util.Date;
26
27 /**
28 * Encapsulates a data point in a {@link TimeLine}
29 *
30 * @author Richard Cyganiak <rcyg@gmx.de>
31 * @version $Id: TimePoint.java,v 1.2 2008/04/02 11:22:14 benoitx Exp $
32 */
33 public class TimePoint {
34 private final Date date;
35 private final int value;
36 private final int delta;
37
38 /**
39 * Creates a new TimePoint
40 * @param date the time point's date
41 * @param value the time point's value
42 * @param delta the time point's change relative to the previous value
43 */
44 public TimePoint(final Date date, final int value, final int delta) {
45 this.date = date;
46 this.value = value;
47 this.delta = delta;
48 }
49
50 /**
51 * @return the time point's date
52 */
53 public Date getDate() {
54 return date;
55 }
56
57 /**
58 * @return the time point's change relative to the previous value
59 */
60 public int getDelta() {
61 return delta;
62 }
63
64 /**
65 * @return the time point's value
66 */
67 public int getValue() {
68 return value;
69 }
70 }