ISSUE
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / core / Description.java
1 package org.opendaylight.controller.sal.core;
2
3 import javax.xml.bind.annotation.XmlElement;
4 import javax.xml.bind.annotation.XmlRootElement;
5
6 import org.apache.commons.lang3.builder.EqualsBuilder;
7 import org.apache.commons.lang3.builder.HashCodeBuilder;
8
9 /**
10  * The class represents the Name property of an element.
11  */
12 @XmlRootElement
13 @SuppressWarnings("serial")
14 public class Description extends Property {
15     @XmlElement
16     private String description;
17     public static final String propertyName = "description";
18
19     /*
20      * Private constructor used for JAXB mapping
21      */
22     private Description() {
23         super(propertyName);
24         this.description = null;
25     }
26
27     public Description(String description) {
28         super(propertyName);
29         this.description = description;
30     }
31
32     public Description clone() {
33         return new Description(this.description);
34     }
35
36     public String getValue() {
37         return this.description;
38     }
39
40     @Override
41     public int hashCode() {
42         return HashCodeBuilder.reflectionHashCode(this);
43     }
44
45     @Override
46     public boolean equals(Object obj) {
47         return EqualsBuilder.reflectionEquals(this, obj);
48     }
49
50     @Override
51     public String toString() {
52         return "Description[" + description + "]";
53     }
54 }