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.XmlRootElement;
14 import javax.xml.bind.annotation.XmlSeeAlso;
19 * @brief Abstract base class for a Property that can be attached to
20 * any sal core element
22 * Abstract base class for a Property that can be attached to any sal
27 * Abstract base class for a Property that can be attached to any sal core
31 @XmlSeeAlso({ Config.class, Name.class, State.class, TimeStamp.class,
32 Latency.class, Bandwidth.class, Tier.class, Actions.class,
33 AdvertisedBandwidth.class, Buffers.class, Capabilities.class,
34 MacAddress.class, PeerBandwidth.class, SupportedBandwidth.class,
35 Tables.class, Description.class, ForwardingMode.class })
36 abstract public class Property implements Serializable, Cloneable {
37 private static final long serialVersionUID = 1L;
38 private final String name;
41 * Private constructor used for JAXB mapping
43 @SuppressWarnings("unused")
48 protected Property(String name) {
52 public String getName() {
56 public abstract String getStringValue();
59 * Used to copy the Property in a polymorphic way
61 * @return A clone of this Property
64 public abstract Property clone();
67 public int hashCode() {
70 result = prime * result + ((name == null) ? 0 : name.hashCode());
75 public boolean equals(Object obj) {
82 if (getClass() != obj.getClass()) {
85 Property other = (Property) obj;
87 if (other.name != null) {
90 } else if (!name.equals(other.name)) {
97 public String toString() {
98 return "Property [name=" + name + "]";