]> git.basschouten.com Git - openhab-addons.git/blob
e534a11dca3a56add8d93ae0ffdadb7f13246032
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.freeathomesystem.internal.util;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * The {@link PIdContainerClass} is a helper class for pairing IDs
19  *
20  * @author Andras Uhrin - Initial contribution
21  *
22  */
23 @NonNullByDefault
24 public class PIdContainerClass {
25     String valueType;
26     String category;
27     int min;
28     int max;
29     String label;
30     String description;
31
32     PIdContainerClass(String pValueType, String pCategory, String pMin, String pMax, String pLabel,
33             String pDescription) {
34         this.valueType = pValueType;
35
36         this.category = pCategory;
37
38         if (pMax.isEmpty()) {
39             this.min = 0;
40         } else {
41             this.min = Integer.parseInt(pMin);
42         }
43
44         if (pMax.isEmpty()) {
45             this.max = 100;
46         } else {
47             this.max = Integer.parseInt(pMax);
48         }
49
50         this.label = pLabel;
51
52         this.description = pDescription;
53     }
54 }