Exemple #1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (!super.equals(obj)) return false;
   if (getClass() != obj.getClass()) return false;
   ARP other = (ARP) obj;
   if (hardwareAddressLength != other.hardwareAddressLength) return false;
   if (hardwareType != other.hardwareType) return false;
   if (opCode == null) {
     if (other.opCode != null) return false;
   } else if (!opCode.equals(other.opCode)) return false;
   if (protocolAddressLength != other.protocolAddressLength) return false;
   if (protocolType != other.protocolType) return false;
   if (senderHardwareAddress == null) {
     if (other.senderHardwareAddress != null) return false;
   } else if (!senderHardwareAddress.equals(other.senderHardwareAddress)) return false;
   if (senderProtocolAddress == null) {
     if (other.senderProtocolAddress != null) return false;
   } else if (!senderProtocolAddress.equals(other.senderProtocolAddress)) return false;
   if (targetHardwareAddress == null) {
     if (other.targetHardwareAddress != null) return false;
   } else if (!targetHardwareAddress.equals(other.targetHardwareAddress)) return false;
   if (targetProtocolAddress == null) {
     if (other.targetProtocolAddress != null) return false;
   } else if (!targetProtocolAddress.equals(other.targetProtocolAddress)) return false;
   return true;
 }