@Override public int hashCode() { int result = bootOrder; result = 31 * result + (firewallPolicy != null ? firewallPolicy.hashCode() : 0); result = 31 * result + (ipV4Configuration != null ? ipV4Configuration.hashCode() : 0); result = 31 * result + (ipV6Configuration != null ? ipV6Configuration.hashCode() : 0); result = 31 * result + (mac != null ? mac.hashCode() : 0); result = 31 * result + (model != null ? model.hashCode() : 0); result = 31 * result + (runtime != null ? runtime.hashCode() : 0); result = 31 * result + (vlan != null ? vlan.hashCode() : 0); return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof NIC)) return false; NIC nic = (NIC) o; if (bootOrder != nic.bootOrder) return false; if (firewallPolicy != null ? !firewallPolicy.equals(nic.firewallPolicy) : nic.firewallPolicy != null) return false; if (ipV4Configuration != null ? !ipV4Configuration.equals(nic.ipV4Configuration) : nic.ipV4Configuration != null) return false; if (ipV6Configuration != null ? !ipV6Configuration.equals(nic.ipV6Configuration) : nic.ipV6Configuration != null) return false; if (mac != null ? !mac.equals(nic.mac) : nic.mac != null) return false; if (model != nic.model) return false; if (runtime != null ? !runtime.equals(nic.runtime) : nic.runtime != null) return false; if (vlan != null ? !vlan.equals(nic.vlan) : nic.vlan != null) return false; return true; }