@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((port == null) ? 0 : port.hashCode()); result = prime * result + ((sIP == null) ? 0 : sIP.hashCode()); result = prime * result + Arrays.hashCode(sMac); result = prime * result + Arrays.hashCode(tMac); result = prime * result + vlan; return result; }
public void update(NodeConnector nodeConnector) { if (nodeConnector != null) { this.connectors.put(nodeConnector.getNodeConnectorIDString(), nodeConnector); } if (this.connectors.get("1") == null || this.connectors.get("2") == null) { return; } else { this.hostPort = this.connectors.get("1"); this.netPort = this.connectors.get("2"); this.inOutFlow = new ArrayList<Flow>(); if (this.setInitialRule() != true) { logger.info(this.node.toString() + " is not well initialised"); } this.tagRoute = new ArrayList<Flow>(); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof ARPReply)) { return false; } ARPReply other = (ARPReply) obj; if (port == null) { if (other.port != null) { return false; } } else if (!port.equals(other.port)) { return false; } if (sIP == null) { if (other.sIP != null) { return false; } } else if (!sIP.equals(other.sIP)) { return false; } if (!Arrays.equals(sMac, other.sMac)) { return false; } if (!Arrays.equals(tMac, other.tMac)) { return false; } if (vlan != other.vlan) { return false; } return true; }