- // Check only equality for the key fields
- return new EqualsBuilder().append(networkAddress, other.networkAddress)
- .append(subnetMaskLength, other.subnetMaskLength).isEquals();
+ if (networkAddress == null) {
+ if (other.networkAddress != null) {
+ return false;
+ }
+ } else if (!networkAddress.equals(other.networkAddress)) {
+ return false;
+ }
+ if (nodeConnectors == null) {
+ if (other.nodeConnectors != null) {
+ return false;
+ }
+ } else if (!nodeConnectors.equals(other.nodeConnectors)) {
+ return false;
+ }
+ if (subnetMaskLength != other.subnetMaskLength) {
+ return false;
+ }
+ if (vlan != other.vlan) {
+ return false;
+ }
+ return true;