Merge "Fixed a typo on a comment in IPv4.java."
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / reader / NodeDescription.java
index 65efd3c29dc1dc944b6dbe52e2c629d0dd6e6ec8..8f99b05a091cdf268619f821d0aaca567a3af82d 100644 (file)
@@ -9,11 +9,15 @@
 
 package org.opendaylight.controller.sal.reader;
 
+import java.io.Serializable;
+
 
 /**
  * Represents the network node description information
  */
-public class NodeDescription {
+public class NodeDescription implements Serializable, Cloneable{
+    private static final long serialVersionUID = 1L;
+
     private String manufacturer;
     private String hardware;
     private String software;
@@ -67,7 +71,18 @@ public class NodeDescription {
     @Override
     public String toString() {
         return "HwDescription[manufacturer=" + manufacturer + ", hardware="
-                       + hardware + ", software=" + software + ", serialNumber=" 
-                       + serialNumber + ", description=" + description + "]";
+                        + hardware + ", software=" + software + ", serialNumber="
+                        + serialNumber + ", description=" + description + "]";
+    }
+    @Override
+    public NodeDescription clone() {
+        NodeDescription nd = new NodeDescription();
+        nd.setDescription(description);
+        nd.setHardware(hardware);
+        nd.setManufacturer(manufacturer);
+        nd.setSerialNumber(serialNumber);
+        nd.setSoftware(software);
+
+        return nd;
     }
 }