[CORD-2774] Support Dual-homing
Change-Id: I54d26e6dd0a76ba726afdf3b7160c46dcf6b79c5
(cherry picked from commit 57262b2076d5662f9d3390655cee105dac581b13)
diff --git a/apps/t3/src/main/java/org/onosproject/t3/api/GroupsInDevice.java b/apps/t3/src/main/java/org/onosproject/t3/api/GroupsInDevice.java
index e63bdca..74203af 100644
--- a/apps/t3/src/main/java/org/onosproject/t3/api/GroupsInDevice.java
+++ b/apps/t3/src/main/java/org/onosproject/t3/api/GroupsInDevice.java
@@ -21,6 +21,7 @@
import org.onosproject.net.group.Group;
import java.util.List;
+import java.util.Objects;
/**
* Class to represent the groups in a device for a given output and packet.
@@ -83,8 +84,31 @@
}
@Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ GroupsInDevice that = (GroupsInDevice) o;
+
+ return Objects.equals(output, that.output) &&
+ Objects.equals(groups, that.groups) &&
+ Objects.equals(selector, that.selector);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(output, groups, selector);
+ }
+
+ @Override
public String toString() {
return "GroupsInDevice{" +
+
"output=" + output +
", groups=" + groups +
", selector=" + selector +