]> git.basschouten.com Git - openhab-addons.git/blob
f4870f8870e14dc3b02c04bae6150ace6b130e12
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.io.imperihome.internal.model;
14
15 import java.util.Date;
16
17 /**
18  * History item data object.
19  *
20  * @author Pepijn de Geus - Initial contribution
21  */
22 public class HistoryItem {
23
24     private long date;
25     private Number value;
26
27     public HistoryItem(Date date, Number value) {
28         this(date.getTime(), value);
29     }
30
31     public HistoryItem(long date, Number value) {
32         this.date = date;
33         this.value = value;
34     }
35
36     public long getDate() {
37         return date;
38     }
39
40     public void setDate(long date) {
41         this.date = date;
42     }
43
44     public Number getValue() {
45         return value;
46     }
47
48     public void setValue(Number value) {
49         this.value = value;
50     }
51 }