]> git.basschouten.com Git - openhab-addons.git/blob
502914938f42b567789f6f0e4f2db9086e8ad2fd
[openhab-addons.git] /
1 /**
2  * Copyright 2017-2018 Gregory Moyer and contributors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.openhab.binding.lametrictime.api.local.model;
17
18 public class StringParameter extends Parameter
19 {
20     private String format;
21     private String value;
22
23     @Override
24     public StringParameter withName(String name)
25     {
26         super.withName(name);
27         return this;
28     }
29
30     @Override
31     public StringParameter withRequired(Boolean required)
32     {
33         super.withRequired(required);
34         return this;
35     }
36
37     public String getFormat()
38     {
39         return format;
40     }
41
42     public void setFormat(String format)
43     {
44         this.format = format;
45     }
46
47     public StringParameter withFormat(String format)
48     {
49         setFormat(format);
50         return this;
51     }
52
53     public String getValue()
54     {
55         return value;
56     }
57
58     public void setValue(String value)
59     {
60         this.value = value;
61     }
62
63     public StringParameter withValue(String value)
64     {
65         setValue(value);
66         return this;
67     }
68
69     @Override
70     public String toString()
71     {
72         StringBuilder builder = new StringBuilder();
73         builder.append("StringParameter [format=");
74         builder.append(format);
75         builder.append(", value=");
76         builder.append(value);
77         builder.append(", getName()=");
78         builder.append(getName());
79         builder.append(", getRequired()=");
80         builder.append(getRequired());
81         builder.append("]");
82         return builder.toString();
83     }
84 }