Introduce top-level pom file.
[mdsal.git] / binding / mdsal-binding-generator-impl / src / main / java / org / opendaylight / yangtools / sal / 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.yangtools.sal.binding.yang.types;
9
10 import org.opendaylight.yangtools.yang.parser.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
22      *            object with payload data
23      */
24     NodeWrappedType(Object wrappedType) {
25         this.wrappedType = wrappedType;
26     }
27
28     /**
29      * Gets payload from class
30      * 
31      * @return object with <code>wrappedType</code>
32      */
33     Object getWrappedType() {
34         return wrappedType;
35     }
36
37     @Override
38     public boolean equals(Object o) {
39         if (this == o) {
40             return true;
41         }
42         if (!(o instanceof NodeWrappedType)) {
43             return false;
44         }
45         NodeWrappedType nodeWrappedType = (NodeWrappedType) o;
46         if (!wrappedType.equals(nodeWrappedType.wrappedType)) {
47             return false;
48         }
49         return true;
50     }
51
52     @Override
53     public int hashCode() {
54         return wrappedType.hashCode();
55     }
56
57     @Override
58     public String toString() {
59         return "NodeWrappedType{" + "wrappedType=" + wrappedType + '}';
60     }
61
62 }