3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.sal.core;
12 import java.io.Serializable;
14 import javax.xml.bind.annotation.XmlRootElement;
15 import javax.xml.bind.annotation.XmlSeeAlso;
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
33 @XmlSeeAlso({ Config.class, Name.class, State.class, TimeStamp.class,
34 Latency.class, Bandwidth.class, Tier.class, Actions.class,
35 AdvertisedBandwidth.class, Buffers.class, Capabilities.class,
36 MacAddress.class, PeerBandwidth.class, SupportedBandwidth.class,
38 abstract public class Property implements Serializable {
39 private static final long serialVersionUID = 1L;
43 * Private constructor used for JAXB mapping
45 @SuppressWarnings("unused")
50 protected Property(String name) {
54 public String getName() {
59 * Used to copy the Property in a polymorphic way
62 * @return A clone of this Property
64 abstract public Property clone();
67 public int hashCode() {
70 result = prime * result + ((name == null) ? 0 : name.hashCode());
75 public boolean equals(Object obj) {
80 if (getClass() != obj.getClass())
82 Property other = (Property) obj;
84 if (other.name != null)
86 } else if (!name.equals(other.name))
92 public String toString() {
93 return "Property [name=" + name + "]";