forked from I2P_Developers/i2p.i2p
findbugs: Added companion equals() and hashCode() methods to existing compareTo()
This commit is contained in:
@@ -259,9 +259,28 @@ class IntroductionManager {
|
|||||||
stag = String.valueOf(tag);
|
stag = String.valueOf(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int compareTo(Introducer i) {
|
public int compareTo(Introducer i) {
|
||||||
return skey.compareTo(i.skey);
|
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