]> git.basschouten.com Git - openhab-addons.git/blob
f391f38ec3913cece6b7d86248543018616bbedb
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.netatmo.internal.api.dto;
14
15 import java.util.Optional;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19
20 /**
21  * The {@link Place} reports location information of a Netatmo system.
22  *
23  * @author GaĆ«l L'hopital - Initial contribution
24  *
25  */
26
27 @NonNullByDefault
28 public class Place implements LocationEx {
29     private @Nullable String city;
30     private @Nullable String country;
31     private @Nullable String timezone;
32     private double altitude;
33     private double[] location = {};
34
35     public Optional<String> getCity() {
36         return Optional.ofNullable(city);
37     }
38
39     @Override
40     public Optional<String> getCountry() {
41         return Optional.ofNullable(country);
42     }
43
44     @Override
45     public Optional<String> getTimezone() {
46         return Optional.ofNullable(timezone);
47     }
48
49     @Override
50     public double getAltitude() {
51         return altitude;
52     }
53
54     @Override
55     public double[] getCoordinates() {
56         return location;
57     }
58 }