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:
Sebastian Bazley 2012-05-11 00:40:26 +00:00
parent 1822d25471
commit e75e686431
1 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,9 @@ public class Pair<K, V> {
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Pair)) {
return false;
} else {