SONAR suggestion - implement equals() whenever compareTo() is implmented
Change-Id: I1eee6f8fd76ac9d7555612a56f84ef16fef9f90d
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/lion/LionConfig.java b/web/gui/src/main/java/org/onosproject/ui/impl/lion/LionConfig.java
index d1a2bb2..e6d73d3 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/lion/LionConfig.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/lion/LionConfig.java
@@ -17,6 +17,7 @@
package org.onosproject.ui.impl.lion;
+import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSortedSet;
import com.google.common.io.CharStreams;
@@ -337,6 +338,24 @@
public int compareTo(CmdAlias o) {
return alias.compareTo(o.alias);
}
+
+ @Override
+ public boolean equals(Object obj) {
+
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final CmdAlias that = (CmdAlias) obj;
+ return Objects.equal(this.alias, that.alias);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(this.alias);
+ }
}
/**
@@ -392,6 +411,24 @@
return rawRes.compareTo(o.rawRes);
}
+ @Override
+ public boolean equals(Object obj) {
+
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final CmdFrom that = (CmdFrom) obj;
+ return Objects.equal(this.rawRes, that.rawRes);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(this.rawRes);
+ }
+
/**
* Returns the resource bundle name from which to import things.
*