X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Forg%2Fmxchange%2Fjcontacts%2Fcontact%2FContact.java;h=5a0489e5fe0cabb0fe2835a2df0f7c1a12e7395a;hb=f67911d2934adfe8a9b5b4f46753a7a24a0dd513;hp=75c6e6cc9e2be0f7ff7f65c604507e0e786b87c0;hpb=ad792e6206ae5867be6ac6dcbb8870f3f0d5538d;p=jcontacts-core.git diff --git a/src/org/mxchange/jcontacts/contact/Contact.java b/src/org/mxchange/jcontacts/contact/Contact.java index 75c6e6c..5a0489e 100644 --- a/src/org/mxchange/jcontacts/contact/Contact.java +++ b/src/org/mxchange/jcontacts/contact/Contact.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Roland Haeder + * Copyright (C) 2016 Roland Haeder * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; /** - * A general contact interface + * A general contact POJI *

* @author Roland Haeder */ @@ -37,257 +37,299 @@ public interface Contact extends Serializable { *

* @param contact Source instance */ - public void copyAll (final Contact contact); + void copyAll (final Contact contact); /** * Birth day *

* @return the birthday */ - public Date getContactBirthday (); + Date getContactBirthday (); /** * Birth day *

* @param birthday the birthday to set */ - public void setContactBirthday (final Date birthday); + void setContactBirthday (final Date birthday); /** * Getter for cellphone number *

* @return Cellphone number */ - public DialableCellphoneNumber getContactCellphoneNumber (); + DialableCellphoneNumber getContactCellphoneNumber (); /** * Setter for cellphone number *

* @param cellphoneNumber Cellphone number */ - public void setContactCellphoneNumber (final DialableCellphoneNumber cellphoneNumber); + void setContactCellphoneNumber (final DialableCellphoneNumber cellphoneNumber); /** * City *

* @return the city */ - public String getContactCity (); + String getContactCity (); /** * City *

* @param city the city to set */ - public void setContactCity (final String city); + void setContactCity (final String city); /** * Comments *

* @return the comment */ - public String getContactComment (); + String getContactComment (); /** * Comments *

* @param comment the comment to set */ - public void setContactComment (final String comment); + void setContactComment (final String comment); /** * Id number *

* @return the contactId */ - public Long getContactId (); + Long getContactId (); /** * Id number *

* @param id the contactId to set */ - public void setContactId (final Long id); + void setContactId (final Long id); /** * Country code *

* @return the countryCode */ - public Country getContactCountry (); + Country getContactCountry (); /** * Country code *

* @param contactCountry the countryCode to set */ - public void setContactCountry (final Country contactCountry); + void setContactCountry (final Country contactCountry); /** * Getter for "created" timestamp *

* @return "created" timestamp */ - public Calendar getContactCreated (); + Calendar getContactCreated (); /** * Setter for "created" timestamp *

* @param created "created" timestamp */ - public void setContactCreated (final Calendar created); + void setContactCreated (final Calendar created); /** * Email address *

* @return the emailAddress */ - public String getContactEmailAddress (); + String getContactEmailAddress (); /** * Email address *

* @param emailAddress the emailAddress to set */ - public void setContactEmailAddress (final String emailAddress); + void setContactEmailAddress (final String emailAddress); /** * Family name *

* @return the familyName */ - public String getContactFamilyName (); + String getContactFamilyName (); /** * Family name *

* @param familyName the familyName to set */ - public void setContactFamilyName (final String familyName); + void setContactFamilyName (final String familyName); /** * Fax number *

* @return the faxNumber */ - public DialableFaxNumber getContactFaxNumber (); + DialableFaxNumber getContactFaxNumber (); /** * Fax number *

* @param faxNumber the faxNumber to set */ - public void setContactFaxNumber (final DialableFaxNumber faxNumber); + void setContactFaxNumber (final DialableFaxNumber faxNumber); /** * First name *

* @return the first name */ - public String getContactFirstName (); + String getContactFirstName (); /** * First name *

* @param firstName the first name to set */ - public void setContactFirstName (final String firstName); + void setContactFirstName (final String firstName); /** * Gender of the contact *

* @return the gender */ - public Gender getContactGender (); + Gender getContactGender (); /** * Gender of the contact *

* @param gender the gender to set */ - public void setContactGender (final Gender gender); + void setContactGender (final Gender gender); + + /** + * Getter for house number extension, example: 123a 'a' is then the + * extension and 123 is the house number. + *

+ * @return House number extension + */ + String getContactHouseNumberExtension (); + + /** + * Setter for house number extension + *

+ * @param contactHouseNumberExtension House number extension + */ + void setContactHouseNumberExtension (final String contactHouseNumberExtension); /** * House number *

* @return the houseNumber */ - public Short getContactHouseNumber (); + Short getContactHouseNumber (); /** * House number *

* @param houseNumber the houseNumber to set */ - public void setContactHouseNumber (final Short houseNumber); + void setContactHouseNumber (final Short houseNumber); /** * Setter for own contact *

* @param ownContact Own contact */ - public void setContactOwnContact (final Boolean ownContact); + void setContactOwnContact (final Boolean ownContact); /** * Getter for phone number *

* @return Phone number */ - public DialableLandLineNumber getContactPhoneNumber (); + DialableLandLineNumber getContactLandLineNumber (); /** * Setter for phone number *

* @param phoneNumber Phone number */ - public void setContactPhoneNumber (final DialableLandLineNumber phoneNumber); + void setContactLandLineNumber (final DialableLandLineNumber phoneNumber); /** * Street *

* @return the street */ - public String getContactStreet (); + String getContactStreet (); /** * Street *

* @param street the street to set */ - public void setContactStreet (final String street); + void setContactStreet (final String street); + + /** + * Getter for contact's title + *

+ * @return Contact's title + */ + String getContactTitle (); + + /** + * Setter for contact's title + *

+ * @param contactTitle Contact's title + */ + void setContactTitle (final String contactTitle); /** * Getter for "updated" timestamp *

* @return "updated" timestamp */ - public Calendar getContactUpdated (); + Calendar getContactUpdated (); /** * Getter for "updated" timestamp *

* @param updated "updated" timestamp */ - public void setContactUpdated (final Calendar updated); + void setContactUpdated (final Calendar updated); /** * ZIP code *

* @return the zipCode */ - public Integer getContactZipCode (); + Integer getContactZipCode (); /** * ZIP code *

* @param zipCode the zipCode to set */ - public void setContactZipCode (final Integer zipCode); + void setContactZipCode (final Integer zipCode); /** * Checks whether the contact is user's own data *

* @return Own data? */ - public Boolean isOwnContact (); + Boolean isOwnContact (); + + /** + * Check if contacts are same or throw an exception + *

+ * @param object Other possible contact class + *

+ * @return Whether both contacts are same + */ + @Override + boolean equals (final Object object); + + @Override + int hashCode (); }