Hi,
I implemented equals & hash code methods for ModbusTCPMaster. The problem here is, that your "facade" has not relly anything that i can work with to identify unique entities. That is why I have now gone the route via the TCPMasterConnection. A master is now identified through his connection. If it is not the same connection, then it cannot be the same master.
The connection itself, I identify by the address & the port. A connection is exactly the same, if it targets the same IP address & the with the same port.
The problem here now is that you can theoretically create multiple masters with the same address & port. These would then be handled as identical when you call the equals-method on them. Same goes for hashcode-method.
Hi, I implemented equals & hash code methods for
ModbusTCPMaster
. The problem here is, that your "facade" has not relly anything that i can work with to identify unique entities. That is why I have now gone the route via theTCPMasterConnection
. A master is now identified through his connection. If it is not the same connection, then it cannot be the same master. The connection itself, I identify by the address & the port. A connection is exactly the same, if it targets the same IP address & the with the same port. The problem here now is that you can theoretically create multiple masters with the same address & port. These would then be handled as identical when you call the equals-method on them. Same goes for hashcode-method.Oh..., and one small typo in your
CONTRIBUTING.md