]> git.mxchange.org Git - jcontacts-core.git/commitdiff
sorted order: first primary key, then other data
authorRoland Häder <roland@mxchange.org>
Tue, 23 Aug 2016 14:22:56 +0000 (16:22 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 23 Aug 2016 14:22:56 +0000 (16:22 +0200)
src/org/mxchange/jcontacts/contact/UserContact.java

index 06109d7f6d9a484ad0793a9a3de5b28170724e38..4afd434f14549a470d9bcd8f81fae938930871b5 100644 (file)
@@ -295,7 +295,9 @@ public class UserContact implements Contact {
 
                final Contact other = (Contact) object;
 
-               if (!Objects.equals(this.getContactCity(), other.getContactCity())) {
+               if (!Objects.equals(this.getContactId(), other.getContactId())) {
+                       return false;
+               } else if (!Objects.equals(this.getContactCity(), other.getContactCity())) {
                        return false;
                } else if (!Objects.equals(this.getContactEmailAddress(), other.getContactEmailAddress())) {
                        return false;
@@ -317,8 +319,6 @@ public class UserContact implements Contact {
                        return false;
                } else if (!Objects.equals(this.getContactHouseNumberExtension(), other.getContactHouseNumberExtension())) {
                        return false;
-               } else if (!Objects.equals(this.getContactId(), other.getContactId())) {
-                       return false;
                }
 
                return true;