]> git.basschouten.com Git - openhab-addons.git/blob
cea6abe4f90619680c7b3fd8bf6604075112c673
[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 boolean parameter.
17  *
18  * @author Gregory Moyer - Initial contribution
19  */
20 public class BooleanParameter extends Parameter {
21     private Boolean value;
22
23     @Override
24     public BooleanParameter withName(String name) {
25         super.withName(name);
26         return this;
27     }
28
29     @Override
30     public BooleanParameter withRequired(Boolean required) {
31         super.withRequired(required);
32         return this;
33     }
34
35     public Boolean getValue() {
36         return value;
37     }
38
39     public void setValue(Boolean value) {
40         this.value = value;
41     }
42
43     public BooleanParameter withValue(Boolean value) {
44         setValue(value);
45         return this;
46     }
47
48     @Override
49     public String toString() {
50         StringBuilder builder = new StringBuilder();
51         builder.append("BooleanParameter [value=");
52         builder.append(value);
53         builder.append(", getName()=");
54         builder.append(getName());
55         builder.append(", getRequired()=");
56         builder.append(getRequired());
57         builder.append("]");
58         return builder.toString();
59     }
60 }