Deprecate DataObjectReadingUtil
[mdsal.git] / binding / mdsal-binding-spec-util / src / test / java / org / opendaylight / mdsal / binding / spec / util / NodeKey.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.mdsal.binding.spec.util;
9
10 import java.io.Serial;
11 import org.opendaylight.yangtools.yang.binding.Identifier;
12
13 @Deprecated(since = "11.0.3", forRemoval = true)
14 public class NodeKey implements Identifier<Node> {
15     @Serial
16     private static final long serialVersionUID = 1L;
17
18     private final int id;
19
20     public NodeKey(final int id) {
21         this.id = id;
22     }
23
24     public int getId() {
25         return id;
26     }
27
28     @Override
29     public int hashCode() {
30         return Integer.hashCode(id);
31     }
32
33     @Override
34     public boolean equals(final Object obj) {
35         return this == obj || obj != null && getClass() == obj.getClass() && id == ((NodeKey) obj).id;
36     }
37 }