From: Roland Haeder Date: Tue, 13 Oct 2015 12:33:11 +0000 (+0200) Subject: Added equals() hashCode() for easy comparison + updated jar(s) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=da2155ca27467b5deef83f8299393bbaab63cb1d;p=jcontacts-core.git Added equals() hashCode() for easy comparison + updated jar(s) Signed-off-by:Roland Häder --- diff --git a/lib/jcountry-core.jar b/lib/jcountry-core.jar index 049ef5f..7166776 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 5fc3762..c2ea571 100644 Binary files a/lib/jphone-core.jar and b/lib/jphone-core.jar differ diff --git a/src/org/mxchange/jcontacts/contact/Contact.java b/src/org/mxchange/jcontacts/contact/Contact.java index 75c6e6c..2ceaaa4 100644 --- a/src/org/mxchange/jcontacts/contact/Contact.java +++ b/src/org/mxchange/jcontacts/contact/Contact.java @@ -290,4 +290,17 @@ public interface Contact extends Serializable { * @return Own data? */ public Boolean isOwnContact (); + + /** + * Check if contacts are same or throw an exception + *

+ * @param object Other possible contact class + *

+ * @return Whether both contacts are same TODO Needs a lot improvements + */ + @Override + public boolean equals (final Object object); + + @Override + public int hashCode (); } diff --git a/src/org/mxchange/jcontacts/contact/UserContact.java b/src/org/mxchange/jcontacts/contact/UserContact.java index 0797db4..8ab889c 100644 --- a/src/org/mxchange/jcontacts/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/contact/UserContact.java @@ -268,13 +268,6 @@ public class UserContact implements Contact, Comparable { this.setContactUpdated(contact.getContactUpdated()); } - /** - * Check if contacts are same or throw an exception - *

- * @param object Other possible contact class - *

- * @return Whether both contacts are same TODO Needs a lot improvements - */ @Override public boolean equals (final Object object) { // Is it same type?