commit | fd5cdf191fba706f4c72b7816135a821064cf444 | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@onlab.us> | Sun Oct 26 13:28:48 2014 -0700 |
committer | Yuta HIGUCHI <y-higuchi@onlab.us> | Sun Oct 26 19:44:56 2014 -0700 |
tree | d052ecc631fd9dc6d0faba01c895676680374e25 | |
parent | 76905087a09f1aed436af79ddf0c0226e3ae98d3 [diff] |
add toString Change-Id: Iaab5d307e93b3784359a3bc1f80791b1ea833e58
diff --git a/core/api/src/main/java/org/onlab/onos/mastership/MastershipEvent.java b/core/api/src/main/java/org/onlab/onos/mastership/MastershipEvent.java index fdbb645..e99f9ae 100644 --- a/core/api/src/main/java/org/onlab/onos/mastership/MastershipEvent.java +++ b/core/api/src/main/java/org/onlab/onos/mastership/MastershipEvent.java
@@ -4,6 +4,8 @@ import org.onlab.onos.event.AbstractEvent; import org.onlab.onos.net.DeviceId; +import com.google.common.base.MoreObjects; + /** * Describes a device mastership event. */ @@ -62,4 +64,14 @@ public RoleInfo roleInfo() { return roleInfo; } + + @Override + public String toString() { + return MoreObjects.toStringHelper(getClass()) + .add("time", time()) + .add("type", type()) + .add("subject", subject()) + .add("roleInfo", roleInfo) + .toString(); + } }