2 * Copyright (c) 2010-2020 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.airquality.internal.json;
15 import java.util.ArrayList;
16 import java.util.List;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
22 * The {@link AirQualityJsonCity} is responsible for storing
23 * the "city" node from the waqi.org JSON response
25 * @author Kuba Wolanin - Initial contribution
28 public class AirQualityJsonCity {
30 private String name = "";
31 private @Nullable String url;
32 private List<Double> geo = new ArrayList<>();
34 public String getName() {
38 public @Nullable String getUrl() {
42 public String getGeo() {
43 List<String> list = new ArrayList<>();
44 geo.forEach(item -> list.add(item.toString()));
45 return String.join(",", list);