2 * Copyright (c) 2010-2022 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.digitalstrom.internal.lib.climate.datatypes;
15 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.SensorEnum;
18 * The {@link AssignSensorType} assigns a sensor type of a zone to the dSUID of the sensor-device.
20 * @author Michael Ochel - Initial contribution
21 * @author Matthias Siegele - Initial contribution
23 public class AssignSensorType {
25 private final SensorEnum sensorType;
26 private final String dsuid;
29 * Create a new {@link AssignSensorType}.
31 * @param sensorType must not be null
32 * @param dSUID must not be null
34 public AssignSensorType(SensorEnum sensorType, String dSUID) {
35 this.sensorType = sensorType;
40 * Returns the sensor type as {@link SensorEnum}.
42 * @return the sensor type
44 public SensorEnum getSensorType() {
49 * Returns the dSUID of the assign sensor-device.
53 public String getDSUID() {
60 * @see java.lang.Object#toString()
63 public String toString() {
64 return "AssignSensorType [SENSOR_TYPE=" + sensorType + ", dSUID=" + dsuid + "]";
70 * @see java.lang.Object#hashCode()
73 public int hashCode() {
76 result = prime * result + ((dsuid == null) ? 0 : dsuid.hashCode());
77 result = prime * result + ((sensorType == null) ? 0 : sensorType.hashCode());
84 * @see java.lang.Object#equals(java.lang.Object)
87 public boolean equals(Object obj) {
94 if (!(obj instanceof AssignSensorType)) {
97 AssignSensorType other = (AssignSensorType) obj;
99 if (other.dsuid != null) {
102 } else if (!dsuid.equals(other.dsuid)) {
105 if (sensorType != other.sensorType) {