]> git.basschouten.com Git - openhab-addons.git/blob
81ad6e1eb74066645c799fa808588ba4e1c7bf37
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.lametrictime.internal.api.local.dto;
14
15 /**
16  * Pojo for stringparameter.
17  *
18  * @author Gregory Moyer - Initial contribution
19  */
20 public class StringParameter extends Parameter {
21     private String format;
22     private String value;
23
24     @Override
25     public StringParameter withName(String name) {
26         super.withName(name);
27         return this;
28     }
29
30     @Override
31     public StringParameter withRequired(Boolean required) {
32         super.withRequired(required);
33         return this;
34     }
35
36     public String getFormat() {
37         return format;
38     }
39
40     public void setFormat(String format) {
41         this.format = format;
42     }
43
44     public StringParameter withFormat(String format) {
45         setFormat(format);
46         return this;
47     }
48
49     public String getValue() {
50         return value;
51     }
52
53     public void setValue(String value) {
54         this.value = value;
55     }
56
57     public StringParameter withValue(String value) {
58         setValue(value);
59         return this;
60     }
61
62     @Override
63     public String toString() {
64         StringBuilder builder = new StringBuilder();
65         builder.append("StringParameter [format=");
66         builder.append(format);
67         builder.append(", value=");
68         builder.append(value);
69         builder.append(", getName()=");
70         builder.append(getName());
71         builder.append(", getRequired()=");
72         builder.append(getRequired());
73         builder.append("]");
74         return builder.toString();
75     }
76 }