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.tankerkoenig.internal.dto;
16 * The {@link OpeningTimes} class is representing all OpeningTimes entries for a station from the api request (i.e array
17 * of settings like "Montag" "09:00" "18:00")
18 * plus the boolean WholeDay (open).
20 * @author Jürgen Baginski - Initial contribution
22 public class OpeningTimes {
24 private Boolean wholeDay;
25 private OpeningTime[] openingTimes;
28 public OpeningTimes(String id, Boolean wholeDay, OpeningTime[] lopeningTimes) {
29 this.wholeDay = wholeDay;
30 this.openingTimes = lopeningTimes;
34 public Boolean getWholeDay() {
38 public void setWholeDay(Boolean wholeDay) {
39 this.wholeDay = wholeDay;
42 public OpeningTime[] getOpeningTimes() {
46 public void setOpeningTimes(OpeningTime[] openingTimes) {
47 this.openingTimes = openingTimes;
50 public String getid() {
54 public void setid(String id) {
59 public String toString() {
60 StringBuilder sb = new StringBuilder();
61 sb.append("WholeDay: ").append(this.getWholeDay().toString()).append("/ Days: ");
62 for (OpeningTime ot : this.getOpeningTimes()) {
63 sb.append(ot.toString());