2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.sal.core;
10 import javax.xml.bind.annotation.XmlAccessType;
11 import javax.xml.bind.annotation.XmlAccessorType;
12 import javax.xml.bind.annotation.XmlElement;
13 import javax.xml.bind.annotation.XmlRootElement;
16 * The class represents the Name property of an element.
19 @SuppressWarnings("serial")
20 @XmlAccessorType(XmlAccessType.NONE)
22 public class Description extends Property {
23 @XmlElement(name="value")
24 private String descriptionValue;
25 public static final String propertyName = "description";
28 * Private constructor used for JAXB mapping
30 private Description() {
32 this.descriptionValue = null;
35 public Description(String description) {
37 this.descriptionValue = description;
41 public Description clone() {
42 return new Description(this.descriptionValue);
45 public String getValue() {
46 return this.descriptionValue;
50 public int hashCode() {
52 int result = super.hashCode();
53 result = prime * result
54 + ((descriptionValue == null) ? 0 : descriptionValue.hashCode());
59 public boolean equals(Object obj) {
62 if (!super.equals(obj))
64 if (getClass() != obj.getClass())
66 Description other = (Description) obj;
67 if (descriptionValue == null) {
68 if (other.descriptionValue != null)
70 } else if (!descriptionValue.equals(other.descriptionValue))
76 public String toString() {
77 return "Description[" + descriptionValue + "]";
81 public String getStringValue() {
82 return descriptionValue;