From: Roland Häder Date: Tue, 23 Aug 2016 14:22:56 +0000 (+0200) Subject: sorted order: first primary key, then other data X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2f3bbcb5b34f08761e42c4c940c913eba641fe22;p=jcontacts-core.git sorted order: first primary key, then other data --- diff --git a/src/org/mxchange/jcontacts/contact/UserContact.java b/src/org/mxchange/jcontacts/contact/UserContact.java index 06109d7..4afd434 100644 --- a/src/org/mxchange/jcontacts/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/contact/UserContact.java @@ -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;