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;
16 import javax.xml.bind.annotation.XmlSeeAlso;
21 * @brief Abstract base class for a Property that can be attached to
22 * any sal core element
24 * Abstract base class for a Property that can be attached to any sal
29 * Abstract base class for a Property that can be attached to any sal core
33 @XmlAccessorType(XmlAccessType.NONE)
34 abstract public class Property implements Serializable, Cloneable {
35 private static final long serialVersionUID = 1L;
36 private final String name;
39 * Private constructor used for JAXB mapping
41 @SuppressWarnings("unused")
46 protected Property(String name) {
50 public String getName() {
54 public abstract String getStringValue();
57 * Used to copy the Property in a polymorphic way
59 * @return A clone of this Property
62 public abstract Property clone();
65 public int hashCode() {
68 result = prime * result + ((name == null) ? 0 : name.hashCode());
73 public boolean equals(Object obj) {
80 if (getClass() != obj.getClass()) {
83 Property other = (Property) obj;
85 if (other.name != null) {
88 } else if (!name.equals(other.name)) {
95 public String toString() {
96 return "Property [name=" + name + "]";