]> git.basschouten.com Git - openhab-addons.git/blob
67d95b28927fd3ebd37c3b5d0fac50a2308ec85c
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 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.rfxcom.internal.config;
14
15 /**
16  * Test helper for RFXCom-binding
17  *
18  * @author Martin van Wingerden - Initial contribution
19  */
20 public class RFXComDeviceConfigurationBuilder {
21     private final RFXComDeviceConfiguration config;
22
23     public RFXComDeviceConfigurationBuilder() {
24         config = new RFXComDeviceConfiguration();
25     }
26
27     public RFXComDeviceConfigurationBuilder withDeviceId(String deviceId) {
28         config.deviceId = deviceId;
29         return this;
30     }
31
32     public RFXComDeviceConfigurationBuilder withSubType(String subType) {
33         config.subType = subType;
34         return this;
35     }
36
37     public RFXComDeviceConfigurationBuilder withPulse(Integer pulse) {
38         config.pulse = pulse;
39         return this;
40     }
41
42     public RFXComDeviceConfiguration build() {
43         return config;
44     }
45 }