Add a few toString() methods 05/36105/2
authorStephen Kitt <skitt@redhat.com>
Fri, 11 Mar 2016 10:14:44 +0000 (11:14 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 23 Mar 2016 09:36:04 +0000 (09:36 +0000)
These help when converting to DataTree ;-).

Change-Id: I9b0fdb428ebe0265cb4321bd6ee31dedb4811950
Signed-off-by: Stephen Kitt <skitt@redhat.com>
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/DataTreeIdentifier.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/LazyDataObjectModification.java
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/LazyDataTreeModification.java

index b86d31b..a90d6da 100644 (file)
@@ -76,4 +76,10 @@ public final class DataTreeIdentifier<T extends DataObject> implements Immutable
         }
         return rootIdentifier.equals(other.rootIdentifier);
     }
+
+    @Override
+    public String toString() {
+        return getClass().getSimpleName() + "{datastoreType = " + datastoreType + ", rootIdentifier = " +
+                rootIdentifier + "}";
+    }
 }
\ No newline at end of file
index d81765e..04d97aa 100644 (file)
@@ -201,4 +201,9 @@ final class LazyDataObjectModification<T extends DataObject> implements DataObje
         }
         return null;
     }
+
+    @Override
+    public String toString() {
+        return getClass().getSimpleName() + "{identifier = " + identifier + ", domData = " + domData + "}";
+    }
 }
index af82225..b257bb1 100644 (file)
@@ -65,4 +65,8 @@ class LazyDataTreeModification<T extends DataObject> implements DataTreeModifica
         return result;
     }
 
+    @Override
+    public String toString() {
+        return getClass().getSimpleName() + "{path = " + path + ", rootNode = " + rootNode + "}";
+    }
 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.