|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.wimpi.pim.contact.basicimpl.CommunicationsImpl
A basic and simple implementation of the
Communications
.
Field Summary | |
protected java.util.List |
m_EmailAddresses
|
protected java.lang.String |
m_Mailer
|
protected java.util.List |
m_PhoneNumbers
|
protected EmailAddress |
m_PreferredEmail
|
protected PhoneNumber |
m_PreferredNumber
|
Constructor Summary | |
CommunicationsImpl()
|
Method Summary | |
void |
addEmailAddress(EmailAddress email)
Adds the given EmailAddress instance to this Communications. |
void |
addPhoneNumber(PhoneNumber number)
Adds the given PhoneNumber instance to this Communications. |
EmailAddress |
getEmailAddress(java.lang.String uid)
Returns the EmailAddress instance with the given identifier. |
int |
getEmailAddressCount()
Returns the number of EmailAddress instances associated with this Communications. |
java.util.Iterator |
getEmailAddresses()
Returns all email addresses associated with this Communications. |
java.lang.String |
getMailer()
Returns the mailer identification. |
PhoneNumber |
getPhoneNumber(java.lang.String uid)
Returns the PhoneNumber instance with the given identifier. |
int |
getPhoneNumberCount()
Returns the number of PhoneNumber instances associated with this Communications. |
java.util.Iterator |
getPhoneNumbers()
Returns all phone numbers associated with this Communications. |
EmailAddress |
getPreferredEmailAddress()
Returns the preferred email address of this Communications instance. |
PhoneNumber |
getPreferredPhoneNumber()
Returns the preferred the phone number of this Communications instance. |
boolean |
isPreferredEmailAddress(EmailAddress email)
Tests if the given email address is the preferred one of this Communications instance. |
boolean |
isPreferredPhoneNumber(PhoneNumber number)
Tests if the given phone number is the preferred one. |
EmailAddress[] |
listEmailAddresses()
Returns all email addresses associated with this Communications. |
PhoneNumber[] |
listPhoneNumbers()
Returns all phone numbers associated with this Communications. |
PhoneNumber[] |
listPhoneNumbersByType(int TYPE)
Returns the phone numbers of a given type of this Communications instance. |
void |
removeEmailAddress(EmailAddress email)
Removes the given EmailAddress instance from this Communications. |
void |
removePhoneNumber(PhoneNumber number)
Removes the given PhoneNumber instance from this Communications. |
void |
setMailer(java.lang.String mailer)
Sets the mailer identification. |
void |
setPreferredEmailAddress(EmailAddress email)
Sets the preferred email address of this Communications instance. |
void |
setPreferredPhoneNumber(PhoneNumber number)
Sets the preferred phone number of this Communications instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.List m_PhoneNumbers
protected java.util.List m_EmailAddresses
protected java.lang.String m_Mailer
protected EmailAddress m_PreferredEmail
protected PhoneNumber m_PreferredNumber
Constructor Detail |
public CommunicationsImpl()
Method Detail |
public java.util.Iterator getPhoneNumbers()
Communications
getPhoneNumbers
in interface Communications
public PhoneNumber[] listPhoneNumbers()
Communications
listPhoneNumbers
in interface Communications
public PhoneNumber getPhoneNumber(java.lang.String uid)
Communications
getPhoneNumber
in interface Communications
uid
- a unique identifier as String.
public void addPhoneNumber(PhoneNumber number)
Communications
addPhoneNumber
in interface Communications
number
- the PhoneNumber to be added.public void removePhoneNumber(PhoneNumber number)
Communications
removePhoneNumber
in interface Communications
number
- the PhoneNumber to be removed.public PhoneNumber getPreferredPhoneNumber()
Communications
getPreferredPhoneNumber
in interface Communications
public void setPreferredPhoneNumber(PhoneNumber number)
Communications
setPreferredPhoneNumber
in interface Communications
number
- the preferred phone number as PhoneNumber.public boolean isPreferredPhoneNumber(PhoneNumber number)
Communications
isPreferredPhoneNumber
in interface Communications
number
- the phone number to be tested as PhoneNumber.
public PhoneNumber[] listPhoneNumbersByType(int TYPE)
Communications
listPhoneNumbersByType
in interface Communications
PhoneNumber
public int getPhoneNumberCount()
Communications
getPhoneNumberCount
in interface Communications
public java.util.Iterator getEmailAddresses()
Communications
getEmailAddresses
in interface Communications
public EmailAddress[] listEmailAddresses()
Communications
listEmailAddresses
in interface Communications
public EmailAddress getEmailAddress(java.lang.String uid)
Communications
getEmailAddress
in interface Communications
uid
- a unique identifier as String.
public void addEmailAddress(EmailAddress email)
Communications
addEmailAddress
in interface Communications
email
- the EmailAddress to be added.public void removeEmailAddress(EmailAddress email)
Communications
removeEmailAddress
in interface Communications
email
- the EmailAddress to be removed.public EmailAddress getPreferredEmailAddress()
Communications
getPreferredEmailAddress
in interface Communications
public void setPreferredEmailAddress(EmailAddress email)
Communications
setPreferredEmailAddress
in interface Communications
email
- the preferred email address as EmailAddress.public boolean isPreferredEmailAddress(EmailAddress email)
Communications
isPreferredEmailAddress
in interface Communications
email
- the address to be tested as EmailAddress.
public int getEmailAddressCount()
Communications
getEmailAddressCount
in interface Communications
public java.lang.String getMailer()
Communications
getMailer
in interface Communications
public void setMailer(java.lang.String mailer)
Communications
setMailer
in interface Communications
mailer
- the mailer identification as String.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |