Don't make unnecessary assumptions of Object to be compared

Missing @Override

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1032018 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2010-11-06 12:08:23 +00:00
parent 5b243bb64d
commit 36b8beb614
1 changed files with 2 additions and 2 deletions

View File

@ -87,8 +87,7 @@ public class Pair<K, V> {
if (!(o instanceof Pair)) {
return false;
} else {
Pair<? extends K, ? extends V> oP
= (Pair<? extends K, ? extends V>) o;
Pair<?, ?> oP = (Pair<?, ? >) o;
return (key == null ?
oP.getKey() == null :
key.equals(oP.getKey())) &&
@ -103,6 +102,7 @@ public class Pair<K, V> {
*
* @return the hash code value.
*/
@Override
public int hashCode() {
return (key == null ? 0 : key.hashCode()) ^
(value == null ? 0 : value.hashCode());