Added forgotten equals method for the hash table elements.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1180097 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
461c45aa7d
commit
92743c883b
|
@ -277,6 +277,20 @@ public class PolynomialsUtils {
|
|||
return (v << 16) ^ w;
|
||||
}
|
||||
|
||||
/** Check if the instance represent the same key as another instance.
|
||||
* @param key other key
|
||||
* @return true if the instance and the other key refer to the same polynomial
|
||||
*/
|
||||
public boolean equals(final Object key) {
|
||||
|
||||
if ((key == null) || !(key instanceof JacobiKey)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final JacobiKey otherK = (JacobiKey) key;
|
||||
return (v == otherK.v) && (w == otherK.w);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue