X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Forg%2Fmxchange%2Fjcontacts%2Fcontact%2FContact.java;h=e928b84c46bede51e4a9e5ee6b1e3b450ce0c601;hb=71ed253dc44c16897a3c3b4d73455c82ae4da4c9;hp=1ecef44d51de5d1266ae5ac0bf6dbad075cc326b;hpb=25cf79234279f4cbc2dc91000c40a41f887a4c10;p=jcontacts-core.git diff --git a/src/org/mxchange/jcontacts/contact/Contact.java b/src/org/mxchange/jcontacts/contact/Contact.java index 1ecef44..e928b84 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 @@ -20,9 +20,13 @@ import java.io.Serializable; import java.util.Calendar; import java.util.Date; import org.mxchange.jcontacts.contact.gender.Gender; +import org.mxchange.jcountry.data.Country; +import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; +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
* @param contact Source instance
*/
- public void copyAll (final Contact contact);
+ void copyAll (final Contact contact);
/**
* Birth day
*
* @return the birthday
*/
- public Date getBirthday ();
+ Date getContactBirthday ();
/**
* Birth day
*
* @param birthday the birthday to set
*/
- public void setBirthday (final Date birthday);
+ void setContactBirthday (final Date birthday);
/**
- * Cellphone number
+ * Getter for cellphone number
*
- * @return the cellphoneNumber
+ * @return Cellphone number
*/
- public String getCellphoneNumber ();
+ DialableCellphoneNumber getContactCellphoneNumber ();
/**
- * Cellphone number
+ * Setter for cellphone number
*
- * @param cellphoneNumber the cellphoneNumber to set
+ * @param cellphoneNumber Cellphone number
*/
- public void setCellphoneNumber (final String cellphoneNumber);
+ void setContactCellphoneNumber (final DialableCellphoneNumber cellphoneNumber);
/**
* City
*
* @return the city
*/
- public String getCity ();
+ String getContactCity ();
/**
* City
*
* @param city the city to set
*/
- public void setCity (final String city);
+ void setContactCity (final String city);
/**
* Comments
*
* @return the comment
*/
- public String getComment ();
+ String getContactComment ();
/**
* Comments
*
* @param comment the comment to set
*/
- public void setComment (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 String getCountryCode ();
+ Country getContactCountry ();
/**
* Country code
*
- * @param countryCode the countryCode to set
+ * @param contactCountry the countryCode to set
*/
- public void setCountryCode (final String countryCode);
+ void setContactCountry (final Country contactCountry);
/**
* Getter for "created" timestamp
*
* @return "created" timestamp
*/
- public Calendar getCreated ();
+ Calendar getContactCreated ();
/**
* Setter for "created" timestamp
*
* @param created "created" timestamp
*/
- public void setCreated (final Calendar created);
+ void setContactCreated (final Calendar created);
/**
* Email address
*
* @return the emailAddress
*/
- public String getEmailAddress ();
+ String getContactEmailAddress ();
/**
* Email address
*
* @param emailAddress the emailAddress to set
*/
- public void setEmailAddress (final String emailAddress);
+ void setContactEmailAddress (final String emailAddress);
/**
* Family name
*
* @return the familyName
*/
- public String getFamilyName ();
+ String getContactFamilyName ();
/**
* Family name
*
* @param familyName the familyName to set
*/
- public void setFamilyName (final String familyName);
+ void setContactFamilyName (final String familyName);
/**
* Fax number
*
* @return the faxNumber
*/
- public String getFaxNumber ();
+ DialableFaxNumber getContactFaxNumber ();
/**
* Fax number
*
* @param faxNumber the faxNumber to set
*/
- public void setFaxNumber (final String faxNumber);
+ void setContactFaxNumber (final DialableFaxNumber faxNumber);
/**
* First name
*
* @return the first name
*/
- public String getFirstName ();
+ String getContactFirstName ();
/**
* First name
*
* @param firstName the first name to set
*/
- public void setFirstName (final String firstName);
+ void setContactFirstName (final String firstName);
/**
* Gender of the contact
*
* @return the gender
*/
- public Gender getGender ();
+ Gender getContactGender ();
/**
* Gender of the contact
*
* @param gender the gender to set
*/
- public void setGender (final Gender gender);
+ void setContactGender (final Gender gender);
/**
* House number
*
* @return the houseNumber
*/
- public Short getHouseNumber ();
+ Short getContactHouseNumber ();
/**
* House number
*
* @param houseNumber the houseNumber to set
*/
- public void setHouseNumber (final Short houseNumber);
+ void setContactHouseNumber (final Short houseNumber);
/**
* Setter for own contact
*
* @param ownContact Own contact
*/
- public void setOwnContact (final Boolean ownContact);
+ void setContactOwnContact (final Boolean ownContact);
/**
- * Phone number
+ * Getter for phone number
*
- * @return the phoneNumber
+ * @return Phone number
*/
- public String getPhoneNumber ();
+ DialableLandLineNumber getContactLandLineNumber ();
/**
- * Phone number
+ * Setter for phone number
*
- * @param phoneNumber the phoneNumber to set
+ * @param phoneNumber Phone number
*/
- public void setPhoneNumber (final String phoneNumber);
+ void setContactLandLineNumber (final DialableLandLineNumber phoneNumber);
/**
* Street
*
* @return the street
*/
- public String getStreet ();
+ String getContactStreet ();
/**
* Street
*
* @param street the street to set
*/
- public void setStreet (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 getUpdated ();
+ Calendar getContactUpdated ();
/**
* Getter for "updated" timestamp
*
* @param updated "updated" timestamp
*/
- public void setUpdated (final Calendar updated);
+ void setContactUpdated (final Calendar updated);
/**
* ZIP code
*
* @return the zipCode
*/
- public Integer getZipCode ();
+ Integer getContactZipCode ();
/**
* ZIP code
*
* @param zipCode the zipCode to set
*/
- public void setZipCode (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 TODO Needs a lot improvements
+ */
+ @Override
+ boolean equals (final Object object);
+
+ @Override
+ int hashCode ();
}