]> git.basschouten.com Git - openhab-addons.git/blob
3f43561b2a453069110a57b1146fbbadc88041fa
[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.solarwatt.internal.domain;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * Helper to handle different character cases between energy manager tagnames
19  * and openhab channel names.
20  *
21  * @author Sven Carstens - Initial contribution
22  */
23 @NonNullByDefault
24 public class SolarwattTag {
25     private final String tagName;
26     private final String channelName;
27
28     public SolarwattTag(String tagName) {
29         this.tagName = tagName;
30         char chars[] = tagName.toCharArray();
31         chars[0] = Character.toLowerCase(chars[0]);
32         this.channelName = new String(chars);
33     }
34
35     public String getTagName() {
36         return this.tagName;
37     }
38
39     public String getChannelName() {
40         return this.channelName;
41     }
42 }