mirror of
https://github.com/apache/commons-math.git
synced 2025-02-11 12:36:05 +00:00
MATH-432
Added a test. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1032182 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
36b8beb614
commit
61499e8725
@ -87,7 +87,7 @@ public class Pair<K, V> {
|
||||
if (!(o instanceof Pair)) {
|
||||
return false;
|
||||
} else {
|
||||
Pair<?, ?> oP = (Pair<?, ? >) o;
|
||||
Pair<?, ?> oP = (Pair<?, ?>) o;
|
||||
return (key == null ?
|
||||
oP.getKey() == null :
|
||||
key.equals(oP.getKey())) &&
|
||||
|
@ -42,5 +42,8 @@ public class PairTest {
|
||||
|
||||
p2 = new Pair<Integer, Double>(new Integer(1), new Double(2));
|
||||
Assert.assertTrue(p1.equals(p2));
|
||||
|
||||
Pair<Integer, Float> p3 = new Pair<Integer, Float>(new Integer(1), new Float(2));
|
||||
Assert.assertFalse(p1.equals(p3));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user