Add UnsignedLongRangeSet.toString()
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / utils / UnsignedLongRangeSet.java
index a1499c5..b8c2fcc 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.cluster.datastore.utils;
 import static java.util.Objects.requireNonNull;
 
 import com.google.common.annotations.Beta;
 import static java.util.Objects.requireNonNull;
 
 import com.google.common.annotations.Beta;
+import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableRangeSet;
 import com.google.common.collect.Range;
 import com.google.common.collect.RangeSet;
 import com.google.common.collect.ImmutableRangeSet;
 import com.google.common.collect.Range;
 import com.google.common.collect.RangeSet;
@@ -64,4 +65,12 @@ public final class UnsignedLongRangeSet implements Mutable {
     public UnsignedLongRangeSet copy() {
         return new UnsignedLongRangeSet(TreeRangeSet.create(rangeset));
     }
     public UnsignedLongRangeSet copy() {
         return new UnsignedLongRangeSet(TreeRangeSet.create(rangeset));
     }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("span", rangeset.span())
+                .add("rangeSize", rangeset.asRanges().size())
+                .toString();
+    }
 }
 }