Migrate OSGI compendium reference
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / test / java / org / opendaylight / controller / sal / binding / test / mock / ReferencableObjectKey.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.sal.binding.test.mock;
9
10 import org.opendaylight.yangtools.yang.binding.Identifier;
11
12 @Deprecated
13 public class ReferencableObjectKey implements Identifier<ReferencableObject> {
14     private static final long serialVersionUID = 1L;
15     final Integer value;
16
17     public ReferencableObjectKey(Integer value) {
18         this.value = value;
19     }
20
21     @Override
22     public int hashCode() {
23         final int prime = 31;
24         int result = 1;
25         result = prime * result + (value == null ? 0 : value.hashCode());
26         return result;
27     }
28
29     @Override
30     public boolean equals(Object obj) {
31         if (this == obj) {
32             return true;
33         }
34         if (obj == null) {
35             return false;
36         }
37         if (getClass() != obj.getClass()) {
38             return false;
39         }
40         ReferencableObjectKey other = (ReferencableObjectKey) obj;
41         if (value == null) {
42             if (other.value != null) {
43                 return false;
44             }
45         } else if (!value.equals(other.value)) {
46             return false;
47         }
48         return true;
49     }
50
51     @Override
52     public String toString() {
53         return "ReferencableObjectKey [value=" + value + "]";
54     }
55
56
57 }