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