Sho SHIMIZU
Committed by Gerrit Code Review

Implement toString() in DefaultPath

Change-Id: I975f6992cb77e490d861aec1ca6686e23b8df1c4
......@@ -15,6 +15,7 @@
*/
package org.onosproject.net;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import org.onosproject.net.provider.ProviderId;
......@@ -73,6 +74,19 @@ public class DefaultPath extends DefaultLink implements Path {
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("src", src())
.add("dst", dst())
.add("type", type())
.add("state", state())
.add("durable", isDurable())
.add("links", links)
.add("cost", cost)
.toString();
}
@Override
public int hashCode() {
return Objects.hash(links);
}
......