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