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)
21 public class Description extends Property {
22 @XmlElement(name="value")
23 private String descriptionValue;
24 public static final String propertyName = "description";
27 * Private constructor used for JAXB mapping
29 private Description() {
31 this.descriptionValue = null;
34 public Description(String description) {
36 this.descriptionValue = description;
40 public Description clone() {
41 return new Description(this.descriptionValue);
44 public String getValue() {
45 return this.descriptionValue;
49 public int hashCode() {
51 int result = super.hashCode();
52 result = prime * result
53 + ((descriptionValue == null) ? 0 : descriptionValue.hashCode());
58 public boolean equals(Object obj) {
61 if (!super.equals(obj))
63 if (getClass() != obj.getClass())
65 Description other = (Description) obj;
66 if (descriptionValue == null) {
67 if (other.descriptionValue != null)
69 } else if (!descriptionValue.equals(other.descriptionValue))
75 public String toString() {
76 return "Description[" + descriptionValue + "]";
80 public String getStringValue() {
81 return descriptionValue;