Signed-off-by: AndreasV <andreas.viborg@gmail.com>
public void setType(String type) {
this.type = type;
}
+
+ @Override
+ public boolean equals(Object obj) {
+ // used to test if device exist
+ if (this == obj) {
+ return true;
+ }
+ if (!(obj instanceof TellstickLocalDeviceDTO other)) {
+ return false;
+ }
+ return deviceId == other.deviceId;
+ }
+
+ @Override
+ public int hashCode() {
+ return deviceId;
+ }
}
public String getUUId() {
return Integer.toString(deviceId);
}
+
+ @Override
+ public boolean equals(Object obj) {
+ // used to test if sensor exist
+ if (this == obj) {
+ return true;
+ }
+ if (!(obj instanceof TellstickLocalSensorDTO other)) {
+ return false;
+ }
+ return deviceId == other.deviceId;
+ }
+
+ @Override
+ public int hashCode() {
+ return deviceId;
+ }
}