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.implementation.util.MaskUtil;
11 import org.opendaylight.lispflowmapping.interfaces.dao.IMappingServiceKey;
12 import org.opendaylight.yang.gen.v1.lispflowmapping.rev131031.lispaddress.LispAddressContainer;
14 public class MappingServiceNoMaskKey implements IMappingServiceKey {
16 private LispAddressContainer EID;
18 public MappingServiceNoMaskKey(LispAddressContainer lispAddressContainer) {
19 this.EID = lispAddressContainer;
22 public LispAddressContainer getEID() {
26 public int getMask() {
27 if (MaskUtil.isMaskable(EID.getAddress())) {
28 return MaskUtil.getMaxMask(EID.getAddress());
35 public int hashCode() {
38 result = prime * result + ((EID == null) ? 0 : EID.hashCode());
43 public boolean equals(Object obj) {
48 if (getClass() != obj.getClass())
50 MappingServiceNoMaskKey other = (MappingServiceNoMaskKey) obj;
52 if (other.EID != null)
54 } else if (!EID.equals(other.EID))
60 public String toString() {
61 return EID.toString();