]> git.basschouten.com Git - openhab-addons.git/blob
718b5bdde878030ca034bdd0a59919e78d3f5873
[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.weatherunderground.internal.json;
14
15 /**
16  * The {@link WeatherUndergroundJsonForecast} is the Java class used
17  * to map the entry "forecast" from the JSON response to a Weather Underground
18  * request.
19  *
20  * @author Laurent Garnier - Initial contribution
21  */
22 public class WeatherUndergroundJsonForecast {
23
24     // Commented members indicate properties returned by the API not used by the binding
25
26     // private Object txt_forecast;
27     private WeatherUndergroundJsonSimpleForecast simpleforecast;
28
29     public WeatherUndergroundJsonForecast() {
30     }
31
32     /**
33      * Get the {@link WeatherUndergroundJsonForecastDay} object for a given day
34      *
35      * @return the {@link WeatherUndergroundJsonForecastDay} object for the day
36      */
37     public WeatherUndergroundJsonForecastDay getSimpleForecast(int day) {
38         return (simpleforecast == null) ? null : simpleforecast.getForecastDay(day);
39     }
40 }