public static class Contact.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder()
Constructor to initialize an empty Contact builder object.
|
Builder(Contact contact)
Constructor to initialize Contact builder with pre-populated
Contact values. |
Modifier and Type | Method and Description |
---|---|
void |
addAddress(Address.Builder addressBuilder)
Add address information for the contact.
|
void |
addAddress(Address address)
Add address information for the contact from pre-populated
Address object. |
void |
addEmail(Email.Builder emailBuilder)
Add Email information for the contact.
|
void |
addEmail(Email email)
Add Email information for the contact from pre-populated
Email object. |
void |
addIM(IM.Builder imBuilder)
Add IM information for the contact.
|
void |
addIM(IM im)
Add IM information for the contact from pre-populated
IM object. |
void |
addPhone(Phone.Builder phoneBuilder)
Add Phone information for the contact.
|
void |
addPhone(Phone phone)
Add Phone information for the contact from pre-populated
Phone object. |
java.lang.Object |
build() |
void |
clearAddressList()
Delete all the items from Address list.
|
void |
clearEmailList()
Delete all the items from the Email list.
|
void |
clearIMList()
Delete all the items from the IM list.
|
void |
clearPhoneList()
Delete all the items from the Phone list.
|
void |
setAddressList(java.util.ArrayList<Address.Builder> addressList)
Set Address list for contact.
|
void |
setAnniversary(java.lang.String anniversary)
Set the anniversary of the contact in the format YYYY-MM-DD.
|
void |
setAssistant(java.lang.String assistant)
Set the assistant name of the contact.
|
void |
setBirthday(java.lang.String birthday)
Set the birthday of the contact in format YYYY-MM-DD.
|
void |
setChildren(java.lang.String children)
Set the children of the contact
|
void |
setEmailList(java.util.ArrayList<Email.Builder> emailList)
Set Email list for the contact.
|
void |
setFavorite(boolean favorite)
Set the contact as favorite.
|
void |
setFirstName(java.lang.String firstName)
Set the first name of the contact.
|
void |
setGender(java.lang.String gender)
Set the gender of the contact.
|
void |
setIMList(java.util.ArrayList<IM.Builder> imList)
Set IM list for the contact.
|
void |
setInCaseOfEmergency(boolean inCaseOfEmergency)
Set if the contact is an emergency contact.
|
void |
setJobTitle(java.lang.String jobTitle)
Set the Job title of the contact.
|
void |
setLastName(java.lang.String lastName)
Set the last name of the contact.
|
void |
setMaritalStatus(java.lang.String maritalStatus)
Set the marital status of the contact.
|
void |
setMiddleName(java.lang.String middleName)
Set the middle name of the contact.
|
void |
setNamePrefix(java.lang.String namePrefix)
Set the name prefix.
|
void |
setNameSuffix(java.lang.String nameSuffix)
Set the name suffix.
|
void |
setNickName(java.lang.String nickName)
Set the nick name of the contact.
|
void |
setNote(java.lang.String note)
Set the note for the contact.
|
void |
setOrgName(java.lang.String orgName)
Set the Organization name of the contact.
|
void |
setOrgUnit(java.lang.String orgUnit)
Set the Organization unit of the contact.
|
void |
setPhoneList(java.util.ArrayList<Phone.Builder> phoneList)
Set the Phone list for the contact.
|
void |
setProfession(java.lang.String profession)
Set the Profession of the contact.
|
void |
setRelationship(java.lang.String relationship)
Set the relationship status of the contact.
|
void |
setSource(java.lang.String source)
Set the Source of the contact
|
void |
setSpouse(java.lang.String spouse)
Set the spouse of the contact.
|
public Builder()
public void setFirstName(java.lang.String firstName)
firstName
- first name of the contactpublic void setMiddleName(java.lang.String middleName)
middleName
- middle name of the contactpublic void setLastName(java.lang.String lastName)
lastName
- last name of the contactpublic void setNickName(java.lang.String nickName)
nickName
- nick name of the contactpublic void setNamePrefix(java.lang.String namePrefix)
namePrefix
- name prefixpublic void setNameSuffix(java.lang.String nameSuffix)
nameSuffix
- name suffixpublic void setBirthday(java.lang.String birthday)
birthday
- birthday of the contact.public void setInCaseOfEmergency(boolean inCaseOfEmergency)
inCaseOfEmergency
- true if the contact is to be set as an emergency contact, false if not.public void setFavorite(boolean favorite)
favorite
- true if the contact is to be set as favorite, false if not.public void setNote(java.lang.String note)
note
- note for the contactpublic void setSource(java.lang.String source)
source
- Source of the contactpublic void setProfession(java.lang.String profession)
profession
- Profession of the contactpublic void setAnniversary(java.lang.String anniversary)
anniversary
- Anniversary of the contactpublic void setSpouse(java.lang.String spouse)
spouse
- spouse of the contactpublic void setChildren(java.lang.String children)
children
- Children of the contactpublic void setJobTitle(java.lang.String jobTitle)
jobTitle
- job title of the contactpublic void setOrgName(java.lang.String orgName)
orgName
- Organization name of the contactpublic void setOrgUnit(java.lang.String orgUnit)
orgUnit
- Organization unit of the contactpublic void setAssistant(java.lang.String assistant)
assistant
- assistant name of the contactpublic void setGender(java.lang.String gender)
gender
- gender of the contactpublic void setRelationship(java.lang.String relationship)
relationship
- relationship status of the contactpublic void setMaritalStatus(java.lang.String maritalStatus)
maritalStatus
- Marital status of the contactpublic void addAddress(Address.Builder addressBuilder)
addressBuilder
- Address.Builder
object with address informationpublic void addAddress(Address address)
Address
object. Call this method multiple times to add multiple address information.address
- Address
object with pre-populated address informationpublic void setAddressList(java.util.ArrayList<Address.Builder> addressList)
addressList
- ArrayList of Address.Builder
with Address informationpublic void clearAddressList()
public void addPhone(Phone.Builder phoneBuilder)
phoneBuilder
- Phone.Builder
object with Phone informationpublic void addPhone(Phone phone)
Phone
object. Call this method multiple times to add multiple phone information.phone
- Phone
object with Phone informationpublic void setPhoneList(java.util.ArrayList<Phone.Builder> phoneList)
phoneList
- ArrayList of Phone.Builder
with phone informationpublic void clearPhoneList()
public void addEmail(Email.Builder emailBuilder)
emailBuilder
- Email.Builder
object with Email informationpublic void addEmail(Email email)
Email
object. Call this method multiple times to add multiple Email information.email
- Email
object with pre-populated Email informationpublic void setEmailList(java.util.ArrayList<Email.Builder> emailList)
emailList
- Email.Builder
with Email informationpublic void clearEmailList()
public void addIM(IM.Builder imBuilder)
imBuilder
- IM.Builder
with IM informationpublic void addIM(IM im)
IM
object. Call this method multiple times to add multiple IM information.im
- IM
object with pre-populated IM informationpublic void setIMList(java.util.ArrayList<IM.Builder> imList)
imList
- ArrayList of IM.Builder
with IM informationpublic void clearIMList()
public java.lang.Object build()