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;
17 import java.util.stream.Collectors;
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.eclipse.jdt.annotation.Nullable;
23 * The {@link AirQualityJsonCity} is responsible for storing
24 * the "city" node from the waqi.org JSON response
26 * @author Kuba Wolanin - Initial contribution
29 public class AirQualityJsonCity {
31 private String name = "";
32 private @Nullable String url;
33 private List<Double> geo = new ArrayList<>();
35 public String getName() {
39 public @Nullable String getUrl() {
43 public String getGeo() {
44 return geo.stream().map(Object::toString).collect(Collectors.joining(", "));