]> git.mxchange.org Git - jcontacts-core.git/commitdiff
Cleanup:
authorRoland Haeder <roland@mxchange.org>
Sat, 12 Mar 2016 11:42:40 +0000 (12:42 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 12 Mar 2016 11:42:40 +0000 (12:42 +0100)
- compareTo()/Comparable<T> 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)

lib/jcore.jar
lib/jcountry-core.jar
lib/jphone-core.jar
src/org/mxchange/jcontacts/contact/UserContact.java

index 23ef19d3e26ecc03e092895707158a0296bb95bf..097890ccbac9f229dc08c9aa1dd3e6ca12696ce6 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
index 8f2a52866c7ad118b28db9a470c105f6fc62f655..70a1a6a6565139b666bc696a133750c5800a8b3b 100644 (file)
Binary files a/lib/jcountry-core.jar and b/lib/jcountry-core.jar differ
index 221f558c88c722e38e98a8f00c55f365f4cf1498..d453cc6e2ed5caff242d519a97bb61fe244d2da0 100644 (file)
Binary files a/lib/jphone-core.jar and b/lib/jphone-core.jar differ
index b1daf29b463fe388f1b192694e929bd5e749fee3..3a368ba1572ff50237129dd61f03ed689f1a5864 100644 (file)
@@ -67,7 +67,7 @@ import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
                        )
                }
 )
-public class UserContact implements Contact, Comparable<Contact> {
+public class UserContact implements Contact {
 
        /**
         * Serial number
@@ -234,26 +234,6 @@ public class UserContact implements Contact, Comparable<Contact> {
                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: