findbugs: Added companion equals() and hashCode() methods to existing compareTo()

This commit is contained in:
dev
2015-04-06 16:04:05 +00:00
parent 80eb7635c1
commit 4d8e577ffd

View File

@@ -259,9 +259,28 @@ class IntroductionManager {
stag = String.valueOf(tag);
}
@Override
public int compareTo(Introducer i) {
return skey.compareTo(i.skey);
}
@Override
public boolean equals(Object o) {
if (o == null) {
return false;
}
if (!(o instanceof Introducer)) {
return false;
}
Introducer i = (Introducer) o;
return this.compareTo(i) == 0;
}
@Override
public int hashCode() {
return skey.hashCode();
}
}
/**