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.airquality.internal.api.dto;
15 import java.util.List;
16 import java.util.stream.Collectors;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
22 * The {@link AirQualityCity} is responsible for storing
23 * the "city" node from the waqi.org JSON response
25 * @author Kuba Wolanin - Initial contribution
28 public class AirQualityCity {
29 private String name = "";
30 private @Nullable String url;
31 private List<Double> geo = List.of();
33 public String getName() {
37 public @Nullable String getUrl() {
41 public String getGeo() {
42 return geo.stream().map(Object::toString).collect(Collectors.joining(", "));