Moved find device to its own utility method, and added a specific equals method and reworked some test.
This commit is contained in:
parent
7e8938c38c
commit
c7e286f51e
166 changed files with 618 additions and 374 deletions
|
|
@ -48,6 +48,7 @@
|
|||
|
||||
package se.hal.plugin.mqtt.device;
|
||||
|
||||
import se.hal.intf.HalDeviceConfig;
|
||||
import se.hal.intf.HalEventConfig;
|
||||
import se.hal.intf.HalEventController;
|
||||
import se.hal.intf.HalEventData;
|
||||
|
|
@ -79,4 +80,11 @@ public class HalMqttDeviceConfig implements HalEventConfig {
|
|||
public Class<? extends HalEventData> getDeviceDataClass() {
|
||||
return HalMqttDeviceData.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof HalMqttDeviceConfig)
|
||||
return topic.equals(((HalMqttDeviceConfig) obj).topic);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue