1 package org.opendaylight.controller.sal.core;
3 import javax.xml.bind.annotation.XmlAccessType;
4 import javax.xml.bind.annotation.XmlAccessorType;
5 import javax.xml.bind.annotation.XmlElement;
6 import javax.xml.bind.annotation.XmlRootElement;
9 * The class represents the Name property of an element.
12 @SuppressWarnings("serial")
13 @XmlAccessorType(XmlAccessType.NONE)
14 public class Description extends Property {
15 @XmlElement(name="value")
16 private String descriptionValue;
17 public static final String propertyName = "description";
20 * Private constructor used for JAXB mapping
22 private Description() {
24 this.descriptionValue = null;
27 public Description(String description) {
29 this.descriptionValue = description;
33 public Description clone() {
34 return new Description(this.descriptionValue);
37 public String getValue() {
38 return this.descriptionValue;
42 public int hashCode() {
44 int result = super.hashCode();
45 result = prime * result
46 + ((descriptionValue == null) ? 0 : descriptionValue.hashCode());
51 public boolean equals(Object obj) {
54 if (!super.equals(obj))
56 if (getClass() != obj.getClass())
58 Description other = (Description) obj;
59 if (descriptionValue == null) {
60 if (other.descriptionValue != null)
62 } else if (!descriptionValue.equals(other.descriptionValue))
68 public String toString() {
69 return "Description[" + descriptionValue + "]";
73 public String getStringValue() {
74 return descriptionValue;