2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.weatherunderground.internal.json;
15 import java.util.List;
18 * The {@link WeatherUndergroundJsonSimpleForecast} is the Java class used
19 * to map the entry "forecast.simpleforecast" from the JSON response
20 * to a Weather Underground request.
22 * @author Laurent Garnier - Initial contribution
24 public class WeatherUndergroundJsonSimpleForecast {
26 private List<WeatherUndergroundJsonForecastDay> forecastday;
28 public WeatherUndergroundJsonSimpleForecast() {
32 * Get the {@link WeatherUndergroundJsonForecastDay} object for a given day
34 * @return the {@link WeatherUndergroundJsonForecastDay} object for the day
36 public WeatherUndergroundJsonForecastDay getForecastDay(int day) {
37 for (WeatherUndergroundJsonForecastDay forecast : forecastday) {
38 if (forecast.getPeriod().intValue() == day) {