Fix checkstyle in mdsal-binding-generator-impl
[mdsal.git] / binding / mdsal-binding-generator-impl / src / main / java / org / opendaylight / mdsal / binding / yang / types / NodeWrappedType.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.yang.types;
9
10 import org.opendaylight.yangtools.util.TopologicalSort.NodeImpl;
11
12 public final class NodeWrappedType extends NodeImpl {
13     /**
14      * The payload which is saved inside Node.
15      */
16     private final Object wrappedType;
17
18     /**
19      * Create new instance of class <code>NodeWrappedType</code>.
20      *
21      * @param wrappedType object with payload data
22      */
23     NodeWrappedType(final Object wrappedType) {
24         this.wrappedType = wrappedType;
25     }
26
27     /**
28      * Gets payload from class.
29      *
30      * @return object with <code>wrappedType</code>
31      */
32     Object getWrappedType() {
33         return wrappedType;
34     }
35
36     @Override
37     public boolean equals(final Object obj) {
38         if (this == obj) {
39             return true;
40         }
41         if (!(obj instanceof NodeWrappedType)) {
42             return false;
43         }
44         NodeWrappedType nodeWrappedType = (NodeWrappedType) obj;
45         if (!wrappedType.equals(nodeWrappedType.wrappedType)) {
46             return false;
47         }
48         return true;
49     }
50
51     @Override
52     public int hashCode() {
53         return wrappedType.hashCode();
54     }
55
56     @Override
57     public String toString() {
58         return "NodeWrappedType{" + "wrappedType=" + wrappedType + '}';
59     }
60 }