X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fadsal%2Fsamples%2Fsimpleforwarding%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsamples%2Fsimpleforwarding%2FHostNodePair.java;fp=opendaylight%2Fadsal%2Fsamples%2Fsimpleforwarding%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsamples%2Fsimpleforwarding%2FHostNodePair.java;h=0000000000000000000000000000000000000000;hb=50f88249a65c52ba56a48852b71ce432fed2bbeb;hp=2d0d468466a3bf5f2bfdaa4d9003758090113495;hpb=abfa9a03550cbe9fccc4420684dced175dd6d119;p=controller.git diff --git a/opendaylight/adsal/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/HostNodePair.java b/opendaylight/adsal/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/HostNodePair.java deleted file mode 100644 index 2d0d468466..0000000000 --- a/opendaylight/adsal/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/HostNodePair.java +++ /dev/null @@ -1,85 +0,0 @@ - -/* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.controller.samples.simpleforwarding; - -import java.io.Serializable; - -import org.opendaylight.controller.hosttracker.hostAware.HostNodeConnector; -import org.opendaylight.controller.sal.core.Node; - -/** - * Class that represent a pair of {Host, Node}, the intent of it - * is to be used as a key in the database kept by IPSwitching module - * where for every Host, Switch we will have a Forwarding Rule that - * will route the traffic toward the /32 destination - * - */ -public class HostNodePair implements Serializable { - private static final long serialVersionUID = 1L; - private HostNodeConnector host; - private Node node; - - public HostNodePair(HostNodeConnector h, Node s) { - setNode(s); - setHost(h); - } - - public Node getNode() { - return node; - } - - public void setNode(Node nodeId) { - this.node = nodeId; - } - - public HostNodeConnector getHost() { - return host; - } - - public void setHost(HostNodeConnector host) { - this.host = host; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((host == null) ? 0 : host.hashCode()); - result = prime * result + ((node == null) ? 0 : node.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - HostNodePair other = (HostNodePair) obj; - if (host == null) { - if (other.host != null) - return false; - } else if (!host.equals(other.host)) - return false; - if (node == null) { - if (other.node != null) - return false; - } else if (!node.equals(other.node)) - return false; - return true; - } - - @Override - public String toString() { - return "HostNodePair [host=" + host + ", node=" + node + "]"; - } -}