2 * Copyright (c) 2010-2022 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.io.neeo.internal.models;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
19 * The model representing a Neeo text Channel (serialize/deserialize json use only).
21 * @author Tim Roberts - Initial Contribution
24 public class NeeoDeviceChannelText extends NeeoDeviceChannel {
26 /** Whether the text label is visible or not */
27 private final boolean labelVisible;
30 * Create a new channel based on the parms
32 * @param kind the non-null kind of channel
33 * @param itemName the non-empty item name
34 * @param channelNbr the channel number (must be >= 0)
35 * @param type the non-null type
36 * @param subType the non-null subtype
37 * @param label the non-empty label
38 * @param value the possibly null, possibly empty value
39 * @param range the possibly null range
40 * @param labelVisible true if the text has a visible label
42 public NeeoDeviceChannelText(NeeoDeviceChannelKind kind, String itemName, int channelNbr, NeeoCapabilityType type,
43 ItemSubType subType, String label, @Nullable String value, @Nullable NeeoDeviceChannelRange range,
44 boolean labelVisible) {
45 super(kind, itemName, channelNbr, type, subType, label, value, range);
47 this.labelVisible = labelVisible;
51 * Whether the text label is visible or not
53 * @return true if visible, false otherwise
55 public boolean isLabelVisible() {
60 public String toString() {
61 return "NeeoDeviceChannelText [kind=" + getKind() + ", itemName=" + getItemName() + ", channelNbr="
62 + getChannelNbr() + ", type=" + getType() + ", subType=" + getSubType() + ", label=" + getLabel()
63 + ", value=" + getValue() + ", range=" + getRange() + ", labelVisible=" + labelVisible + "]";