Remove explicit default super-constructor calls
[yangtools.git] / binding / yang-binding / src / test / java / org / opendaylight / yangtools / yang / binding / test / mock / 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.yangtools.yang.binding.test.mock;
9
10 import org.opendaylight.yangtools.yang.binding.Identifier;
11
12 public class NodeKey implements //
13         Identifier<Node> {
14         private static final long serialVersionUID = 1L;
15         private final int id;
16
17     public NodeKey(int id) {
18         this.id = id;
19     }
20
21     public int getId() {
22         return id;
23     }
24
25     @Override
26     public int hashCode() {
27         final int prime = 31;
28         int result = 1;
29         result = prime * result + id;
30         return result;
31     }
32
33     @Override
34     public boolean equals(Object obj) {
35         if (this == obj)
36             return true;
37         if (obj == null)
38             return false;
39         if (getClass() != obj.getClass())
40             return false;
41         NodeKey other = (NodeKey) obj;
42         if (id != other.id)
43             return false;
44         return true;
45     }
46 }