2 * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.netvirt.vpnmanager;
10 import java.net.InetAddress;
11 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
13 public class MacEntry {
14 private String vpnName;
15 private MacAddress macAddress;
16 private InetAddress ipAddress;
17 private String interfaceName;
19 public MacEntry(String vpnName, MacAddress macAddress,
20 InetAddress inetAddress, String interfaceName) {
21 this.vpnName = vpnName;
22 this.macAddress = macAddress;
23 this.ipAddress = inetAddress;
24 this.interfaceName = interfaceName;
27 public String getVpnName() {
31 public void setVpnName(String vpnName) {
32 this.vpnName = vpnName;
35 public MacAddress getMacAddress() {
39 public String getInterfaceName() {
43 public void setInterfaceName(String interfaceName) {
44 this.interfaceName = interfaceName;
47 public InetAddress getIpAddress() {
52 public int hashCode() {
55 result = prime * result
56 + ((macAddress == null) ? 0 : macAddress.hashCode());
61 public boolean equals(Object obj) {
62 if (getClass() != obj.getClass()) {
65 MacEntry other = (MacEntry) obj;
66 return vpnName.equals(other.vpnName) && macAddress.equals(other.macAddress)
67 && ipAddress.equals(other.ipAddress) && interfaceName.equals(other.interfaceName);
72 public String toString() {
73 return "MacEntry [vpnName=" + vpnName + ", macAddress=" + macAddress + ", ipAddress=" + ipAddress
74 + ", interfaceName=" + interfaceName + "]";