Yuta HIGUCHI

add toString

Change-Id: Iaab5d307e93b3784359a3bc1f80791b1ea833e58
...@@ -4,6 +4,8 @@ import org.onlab.onos.cluster.RoleInfo; ...@@ -4,6 +4,8 @@ import org.onlab.onos.cluster.RoleInfo;
4 import org.onlab.onos.event.AbstractEvent; 4 import org.onlab.onos.event.AbstractEvent;
5 import org.onlab.onos.net.DeviceId; 5 import org.onlab.onos.net.DeviceId;
6 6
7 +import com.google.common.base.MoreObjects;
8 +
7 /** 9 /**
8 * Describes a device mastership event. 10 * Describes a device mastership event.
9 */ 11 */
...@@ -62,4 +64,14 @@ public class MastershipEvent extends AbstractEvent<MastershipEvent.Type, DeviceI ...@@ -62,4 +64,14 @@ public class MastershipEvent extends AbstractEvent<MastershipEvent.Type, DeviceI
62 public RoleInfo roleInfo() { 64 public RoleInfo roleInfo() {
63 return roleInfo; 65 return roleInfo;
64 } 66 }
67 +
68 + @Override
69 + public String toString() {
70 + return MoreObjects.toStringHelper(getClass())
71 + .add("time", time())
72 + .add("type", type())
73 + .add("subject", subject())
74 + .add("roleInfo", roleInfo)
75 + .toString();
76 + }
65 } 77 }
......