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