commit | a9700c7a6043c7e6ca47442cc5366e5534a56638 | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@onlab.us> | Fri Oct 24 22:12:03 2014 -0700 |
committer | Yuta HIGUCHI <y-higuchi@onlab.us> | Sun Oct 26 19:44:55 2014 -0700 |
tree | db843e8ca7f28aca2c8c4350e543dcdba21f818e | |
parent | 3195f55ef4938069c349bbdeb75db5a2d36e7153 [diff] |
add toString Change-Id: I14b07972b1f0aec1a7cc21ff053aa30a25af8ca1
diff --git a/core/api/src/main/java/org/onlab/onos/mastership/MastershipTerm.java b/core/api/src/main/java/org/onlab/onos/mastership/MastershipTerm.java index 640180d..216895c 100644 --- a/core/api/src/main/java/org/onlab/onos/mastership/MastershipTerm.java +++ b/core/api/src/main/java/org/onlab/onos/mastership/MastershipTerm.java
@@ -4,6 +4,8 @@ import org.onlab.onos.cluster.NodeId; +import com.google.common.base.MoreObjects; + public final class MastershipTerm { private final NodeId master; @@ -48,4 +50,12 @@ } return false; } + + @Override + public String toString() { + return MoreObjects.toStringHelper(getClass()) + .add("master", this.master) + .add("termNumber", this.termNumber) + .toString(); + } }