From: Roland Haeder Date: Wed, 9 Sep 2015 17:46:23 +0000 (+0200) Subject: Some improvements X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f4f11abed01b61084e97bc665e919afb5d8b6692;p=jcore.git Some improvements Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcore/model/contact/BaseContact.java b/src/org/mxchange/jcore/model/contact/BaseContact.java index 5e761e1..240da44 100644 --- a/src/org/mxchange/jcore/model/contact/BaseContact.java +++ b/src/org/mxchange/jcore/model/contact/BaseContact.java @@ -35,7 +35,7 @@ public abstract class BaseContact implements Contact, Comparable { /** * Id number */ - private Long contactId; + private Long id; /** * Birth day @@ -58,7 +58,7 @@ public abstract class BaseContact implements Contact, Comparable { private String comment; /** - * Companyname + * Company name */ private String companyName; @@ -234,7 +234,7 @@ public abstract class BaseContact implements Contact, Comparable { } /** - * Companyname + * Company name * * @return the companyName */ @@ -244,7 +244,7 @@ public abstract class BaseContact implements Contact, Comparable { } /** - * Companyname + * Company name * * @param companyName the companyName to set */ @@ -255,20 +255,20 @@ public abstract class BaseContact implements Contact, Comparable { /** * Id number - * @return the contactId + * @return the id */ @Override - public Long getContactId () { - return this.contactId; + public Long getId () { + return this.id; } /** * Id number - * @param contactId the contactId to set + * @param id the id to set */ @Override - public void setContactId (final Long contactId) { - this.contactId = contactId; + public void setId (final Long id) { + this.id = id; } /** @@ -538,16 +538,16 @@ public abstract class BaseContact implements Contact, Comparable { throw new NullPointerException("contact is null"); //NOI18N } - // Is the contactId the same? - if (Objects.equals(this.getContactId(), contact.getContactId())) { - // Same contactId, means same contact + // Is the id the same? + if (Objects.equals(this.getId(), contact.getId())) { + // Same id, means same contact return 0; - } else if (this.getContactId() > contact.getContactId()) { - // This contactId is larger than compared to + } else if (this.getId() > contact.getId()) { + // This id is larger than compared to return -1; } - // The other contactId is larger + // The other id is larger return 1; } } diff --git a/src/org/mxchange/jcore/model/contact/Contact.java b/src/org/mxchange/jcore/model/contact/Contact.java index 56cc35b..b31dd20 100644 --- a/src/org/mxchange/jcore/model/contact/Contact.java +++ b/src/org/mxchange/jcore/model/contact/Contact.java @@ -29,13 +29,13 @@ public interface Contact extends Serializable { * Id number * @return the contactId */ - public Long getContactId (); + public Long getId (); /** * Id number - * @param contactId the contactId to set + * @param id the contactId to set */ - public void setContactId (final Long contactId); + public void setId (final Long id); /** * Gender of the contact @@ -80,14 +80,14 @@ public interface Contact extends Serializable { public void setFamilyName (final String familyName); /** - * Companyname + * Company name * * @return the companyName */ public String getCompanyName (); /** - * Companyname + * Company name * * @param companyName the companyName to set */