Node MAC address to be derived inside the protocol plugin
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / core / Property.java
index d50c81e8d79cd519968a441ac664766a8dc33fa1..97d3eac808845ef7e4c8627414c8ec9e2161898a 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
  *
@@ -25,19 +24,18 @@ import javax.xml.bind.annotation.XmlSeeAlso;
  */
 
 /**
- * Abstract base class for a Property that can be attached to any sal
- * core element
- *
+ * Abstract base class for a Property that can be attached to any sal core
+ * element
  */
 @XmlRootElement
 @XmlSeeAlso({ Config.class, Name.class, State.class, TimeStamp.class,
-               Latency.class, Bandwidth.class, Tier.class, Actions.class,
-               AdvertisedBandwidth.class, Buffers.class, Capabilities.class,
-               MacAddress.class, PeerBandwidth.class, SupportedBandwidth.class,
-               Tables.class })
-abstract public class Property implements Serializable {
+    Latency.class, Bandwidth.class, Tier.class, Actions.class,
+    AdvertisedBandwidth.class, Buffers.class, Capabilities.class,
+    MacAddress.class, PeerBandwidth.class, SupportedBandwidth.class,
+    Tables.class })
+abstract public class Property implements Serializable, Cloneable {
     private static final long serialVersionUID = 1L;
-    private String name;
+    private final String name;
 
     /**
      * Private constructor used for JAXB mapping
@@ -58,10 +56,10 @@ abstract public class Property implements Serializable {
     /**
      * Used to copy the Property in a polymorphic way
      *
-     *
      * @return A clone of this Property
      */
-    abstract public Property clone();
+    @Override
+    public abstract Property clone();
 
     @Override
     public int hashCode() {
@@ -73,18 +71,23 @@ abstract public class Property implements Serializable {
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         Property other = (Property) obj;
         if (name == null) {
-            if (other.name != null)
+            if (other.name != null) {
                 return false;
-        } else if (!name.equals(other.name))
+            }
+        } else if (!name.equals(other.name)) {
             return false;
+        }
         return true;
     }