Prevent ConfigPusher from killing its thread
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / restconf / impl / test / structures / YangElement.java
1 package org.opendaylight.controller.sal.restconf.impl.test.structures;
2
3 public class YangElement {
4     protected String name;
5
6     protected YangElement(String name) {
7         this.name = name;
8     }
9
10     public String getName() {
11         return name;
12     }
13
14     @Override
15     public boolean equals(Object obj) {
16         if (this == obj) {
17             return true;
18         }
19         if (!this.getClass().equals(obj.getClass())) {
20             return false;
21         }
22         YangElement yangElement = (YangElement) obj;
23         if (this.name == null) {
24             if (yangElement.name != null) {
25                 return false;
26             }
27         } else if (!this.name.equals(yangElement.name)) {
28             return false;
29         }
30         return true;
31     }
32
33     @Override
34     public int hashCode() {
35         final int prime = 31;
36         int result = 1;
37         result = prime * result + ((name == null) ? 0 : name.hashCode());
38         return result;
39     }
40
41     @Override
42     public String toString() {
43         return name;
44     }
45
46 }