Remove unnecessary overrides of equals/hashCode in Cache.Entry

This commit is contained in:
Jason Tedor 2015-09-30 22:46:14 +02:00
parent 64727b78de
commit 8c05d4f43d

View File

@ -139,24 +139,6 @@ public class Cache<K, V> {
this.value = value;
this.writeTime = this.accessTime = writeTime;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
} else if (!(obj instanceof Entry)) {
return false;
} else {
@SuppressWarnings("unchecked")
Entry<K, V> e = (Entry<K, V>) obj;
return Objects.equals(key, e.key);
}
}
@Override
public int hashCode() {
return Objects.hashCode(key);
}
}
/**