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.tplinksmarthome.internal.model;
15 import com.google.gson.annotations.Expose;
18 * Class to be extended by state classes that support context. i.e. has multiple children that can be controlled.
20 * @author Hilbrand Bouwkamp - Initial contribution
22 public class ContextState {
24 public static class Context {
26 private String[] childIds = new String[1];
28 public void setChildId(String childId) {
29 this.childIds[0] = childId;
33 public String toString() {
34 return " child_ids:[" + childIds[0] + "]";
39 private Context context;
41 public void setChildId(String childId) {
42 context = new Context();
43 context.setChildId(childId);
47 public String toString() {
48 return context == null ? "" : context.toString();