@Override refactoring, some explicit casting added

This commit is contained in:
Oliver Runge
2011-09-17 23:44:06 +02:00
parent 50036a4642
commit 3ec27e07ae
24 changed files with 27 additions and 101 deletions

View File

@@ -10,13 +10,15 @@ public class CachedPassPhrase {
this.passPhrase = passPhrase;
}
public int hashCode() {
@Override
public int hashCode() {
int hc1 = (int)(this.timestamp & 0xffffffff);
int hc2 = (this.passPhrase == null ? 0 : this.passPhrase.hashCode());
return (hc1 + hc2) * hc2 + hc1;
}
public boolean equals(Object other) {
@Override
public boolean equals(Object other) {
if (!(other instanceof CachedPassPhrase)) {
return false;
}
@@ -39,7 +41,8 @@ public class CachedPassPhrase {
return true;
}
public String toString() {
@Override
public String toString() {
return "(" + timestamp + ", *******)";
}
}