]> git.basschouten.com Git - openhab-addons.git/blob
b4dc9d6c9bb9ba4f013b57081f2619aa46cbe299
[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.binding.bluetooth.blukii.internal.data;
14
15 import java.util.Optional;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18
19 /**
20  * Blukii data.
21  *
22  * @author Markus Rathgeb - Initial contribution (migrate from handler)
23  */
24 @NonNullByDefault
25 public class BlukiiData {
26
27     public final int battery;
28     public final Optional<Magnetometer> magnetometer;
29     public final Optional<Environment> environment;
30     public final Optional<Accelerometer> accelerometer;
31
32     public BlukiiData(final int battery, final Optional<Magnetometer> magnetometer,
33             final Optional<Environment> environment, final Optional<Accelerometer> accelerometer) {
34         this.battery = battery;
35         this.magnetometer = magnetometer;
36         this.environment = environment;
37         this.accelerometer = accelerometer;
38     }
39
40     @Override
41     public String toString() {
42         return "BlukiiData [battery=" + battery + ", magnetometer=" + magnetometer + ", environment=" + environment
43                 + ", accelerometer=" + accelerometer + "]";
44     }
45 }