2 * Copyright (c) 2014 Contextream, Inc. 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.lispflowmapping.implementation.dao;
10 import org.opendaylight.lispflowmapping.interfaces.dao.IMappingServiceKey;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.control.plane.rev150314.lispaddress.LispAddressContainer;
13 public class MappingServiceKey implements IMappingServiceKey {
15 private LispAddressContainer EID;
18 public MappingServiceKey(LispAddressContainer lispAddressContainer, int mask) {
19 this.EID = lispAddressContainer;
23 public LispAddressContainer getEID() {
27 public int getMask() {
32 public int hashCode() {
35 result = prime * result + ((EID == null) ? 0 : EID.hashCode());
36 result = prime * result + mask;
41 public boolean equals(Object obj) {
46 if (getClass() != obj.getClass())
48 MappingServiceKey other = (MappingServiceKey) obj;
50 if (other.EID != null)
52 } else if (!EID.equals(other.EID))
54 if (mask != other.mask)
60 public String toString() {
62 return EID.toString() + "/" + mask;
64 return EID.toString();