mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 15:12:56 +00:00
findbugs: Added companion equals() and hashCode() methods to existing compareTo()
This commit is contained in:
1 parent
80eb7635c1
commit
4d8e577ffd
1 file changed
+19
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user