Implement toString in OpticalConnectivityIntent
Change-Id: I0035c8cdd9f909af24a47b0db04d306c33aa8c44
Showing
1 changed file
with
16 additions
and
2 deletions
... | @@ -15,11 +15,12 @@ | ... | @@ -15,11 +15,12 @@ |
15 | */ | 15 | */ |
16 | package org.onosproject.net.intent; | 16 | package org.onosproject.net.intent; |
17 | 17 | ||
18 | -import java.util.Collections; | 18 | +import com.google.common.base.MoreObjects; |
19 | - | ||
20 | import org.onosproject.core.ApplicationId; | 19 | import org.onosproject.core.ApplicationId; |
21 | import org.onosproject.net.ConnectPoint; | 20 | import org.onosproject.net.ConnectPoint; |
22 | 21 | ||
22 | +import java.util.Collections; | ||
23 | + | ||
23 | import static com.google.common.base.Preconditions.checkNotNull; | 24 | import static com.google.common.base.Preconditions.checkNotNull; |
24 | 25 | ||
25 | /** | 26 | /** |
... | @@ -147,4 +148,17 @@ public final class OpticalConnectivityIntent extends Intent { | ... | @@ -147,4 +148,17 @@ public final class OpticalConnectivityIntent extends Intent { |
147 | public ConnectPoint getDst() { | 148 | public ConnectPoint getDst() { |
148 | return dst; | 149 | return dst; |
149 | } | 150 | } |
151 | + | ||
152 | + @Override | ||
153 | + public String toString() { | ||
154 | + return MoreObjects.toStringHelper(this) | ||
155 | + .add("id", id()) | ||
156 | + .add("key", key()) | ||
157 | + .add("appId", appId()) | ||
158 | + .add("priority", priority()) | ||
159 | + .add("resources", resources()) | ||
160 | + .add("src", src) | ||
161 | + .add("dst", dst) | ||
162 | + .toString(); | ||
163 | + } | ||
150 | } | 164 | } | ... | ... |
-
Please register or login to post a comment