From: Roland Haeder Date: Sat, 12 Mar 2016 11:42:40 +0000 (+0100) Subject: Cleanup: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=71ed253dc44c16897a3c3b4d73455c82ae4da4c9;p=jcontacts-core.git Cleanup: - compareTo()/Comparable was used back in the TDGP times and is no longer needed - value first, then variable on comparison to avoid accidently assignments - updated jar(s) --- diff --git a/lib/jcore.jar b/lib/jcore.jar index 23ef19d..097890c 100644 Binary files a/lib/jcore.jar and b/lib/jcore.jar differ diff --git a/lib/jcountry-core.jar b/lib/jcountry-core.jar index 8f2a528..70a1a6a 100644 Binary files a/lib/jcountry-core.jar and b/lib/jcountry-core.jar differ diff --git a/lib/jphone-core.jar b/lib/jphone-core.jar index 221f558..d453cc6 100644 Binary files a/lib/jphone-core.jar and b/lib/jphone-core.jar differ diff --git a/src/org/mxchange/jcontacts/contact/UserContact.java b/src/org/mxchange/jcontacts/contact/UserContact.java index b1daf29..3a368ba 100644 --- a/src/org/mxchange/jcontacts/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/contact/UserContact.java @@ -67,7 +67,7 @@ import org.mxchange.jphone.phonenumbers.landline.LandLineNumber; ) } ) -public class UserContact implements Contact, Comparable { +public class UserContact implements Contact { /** * Serial number @@ -234,26 +234,6 @@ public class UserContact implements Contact, Comparable { this.contactOwnContact = Boolean.FALSE; } - @Override - public int compareTo (final Contact contact) { - // contact should not be null - if (null == contact) { - throw new NullPointerException("contact is null"); //NOI18N - } - - // Is the contactId the same? - if (Objects.equals(this.getContactId(), contact.getContactId())) { - // Same contactId, means same contact - return 0; - } else if (this.getContactId() > contact.getContactId()) { - // This contactId is larger than compared to - return -1; - } - - // The other contactId is larger - return 1; - } - @Override public void copyAll (final Contact contact) { // Copy all: