2 * Copyright (c) 2013 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
9 package org.opendaylight.controller.sal.core;
11 import java.io.Serializable;
13 import javax.xml.bind.annotation.XmlAccessType;
14 import javax.xml.bind.annotation.XmlAccessorType;
15 import javax.xml.bind.annotation.XmlRootElement;
20 * @brief Abstract base class for a Property that can be attached to
21 * any sal core element
23 * Abstract base class for a Property that can be attached to any sal
28 * Abstract base class for a Property that can be attached to any sal core
32 @XmlAccessorType(XmlAccessType.NONE)
33 abstract public class Property implements Serializable, Cloneable {
34 private static final long serialVersionUID = 1L;
35 private final String name;
38 * Private constructor used for JAXB mapping
40 @SuppressWarnings("unused")
45 protected Property(String name) {
49 public String getName() {
53 public abstract String getStringValue();
56 * Used to copy the Property in a polymorphic way
58 * @return A clone of this Property
61 public abstract Property clone();
64 public int hashCode() {
67 result = prime * result + ((name == null) ? 0 : name.hashCode());
72 public boolean equals(Object obj) {
79 if (getClass() != obj.getClass()) {
82 Property other = (Property) obj;
84 if (other.name != null) {
87 } else if (!name.equals(other.name)) {
94 public String toString() {
95 return "Property [name=" + name + "]";