]> git.basschouten.com Git - openhab-addons.git/blob
8403212e4c4ebb6f2f07c66df849ebbf50b9ef3e
[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.persistence.influxdb.internal;
14
15 import java.time.Instant;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19
20 /**
21  * Row data returned from database query
22  *
23  * @author Joan Pujol Espinar - Initial contribution
24  */
25 @NonNullByDefault
26 public class InfluxRow {
27     private final String itemName;
28     private final Instant time;
29     private final @Nullable Object value;
30
31     public InfluxRow(Instant time, String itemName, @Nullable Object value) {
32         this.time = time;
33         this.itemName = itemName;
34         this.value = value;
35     }
36
37     public Instant getTime() {
38         return time;
39     }
40
41     public String getItemName() {
42         return itemName;
43     }
44
45     public @Nullable Object getValue() {
46         return value;
47     }
48 }