2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.solarwatt.internal.domain;
15 import javax.measure.Unit;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * Aggregation of the interesting parts to write into a channel.
23 * From this the {@link org.openhab.core.thing.type.ChannelType}s are created.
25 * @author Sven Carstens - Initial contribution
28 public class SolarwattChannel {
29 private final String channelName;
30 private final @Nullable Unit<?> unit;
31 private final String category;
32 private final Boolean advanced;
34 public SolarwattChannel(String channelName, String category) {
35 this(channelName, category, false);
38 public SolarwattChannel(String channelName, Unit<?> unit, String category) {
39 this(channelName, unit, category, false);
42 public SolarwattChannel(String channelName, String category, Boolean advanced) {
43 this(channelName, null, category, advanced);
46 public SolarwattChannel(String channelName, @Nullable Unit<?> unit, String category, Boolean advanced) {
47 this.channelName = channelName;
49 this.category = category;
50 this.advanced = advanced;
53 public String getChannelName() {
54 return this.channelName;
57 public @Nullable Unit<?> getUnit() {
61 public String getCategory() {
65 public Boolean getAdvanced() {