Shortcut checks for identical objects
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1336985 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1822d25471
commit
e75e686431
|
@ -83,6 +83,9 @@ public class Pair<K, V> {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!(o instanceof Pair)) {
|
if (!(o instanceof Pair)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue