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 @XmlSeeAlso({ Config.class, Name.class, State.class, TimeStamp.class,
35 Latency.class, Bandwidth.class, Tier.class, Actions.class,
36 AdvertisedBandwidth.class, Buffers.class, Capabilities.class,
37 MacAddress.class, PeerBandwidth.class, SupportedBandwidth.class,
38 Tables.class, Description.class, ForwardingMode.class })
39 abstract public class Property implements Serializable, Cloneable {
40 private static final long serialVersionUID = 1L;
41 private final String name;
44 * Private constructor used for JAXB mapping
46 @SuppressWarnings("unused")
51 protected Property(String name) {
55 public String getName() {
59 public abstract String getStringValue();
62 * Used to copy the Property in a polymorphic way
64 * @return A clone of this Property
67 public abstract Property clone();
70 public int hashCode() {
73 result = prime * result + ((name == null) ? 0 : name.hashCode());
78 public boolean equals(Object obj) {
85 if (getClass() != obj.getClass()) {
88 Property other = (Property) obj;
90 if (other.name != null) {
93 } else if (!name.equals(other.name)) {
100 public String toString() {
101 return "Property [name=" + name + "]";