Package adams.core.net
Class EmailContact
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.core.net.EmailContact
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<EmailContact>,SizeOfHandler,Serializable,Comparable<EmailContact>
public class EmailContact extends AbstractOptionHandler implements Comparable<EmailContact>, ShallowCopySupporter<EmailContact>
Encapsulates an email contact.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringm_Addressthe address.protected Stringm_Emailthe email address.protected Stringm_FirstNamethe first name.protected Stringm_LastNamethe last name.protected Stringm_Notethe note.protected Stringm_Phonethe phone.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description EmailContact()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringaddressTipText()Returns the tip text for this property.intcompareTo(EmailContact o)Compares this contact with the provided one.voiddefineOptions()Adds options to the internal list of options.StringemailTipText()Returns the tip text for this property.booleanequals(Object obj)Compares this object against the specified one.StringfirstNameTipText()Returns the tip text for this property.StringgetAddress()Returns the address.StringgetEmail()Returns the email name.StringgetFirstName()Returns the first name.StringgetLastName()Returns the last name.StringgetNote()Returns the note.StringgetPhone()Returns the phone.StringglobalInfo()Returns a string describing the object.StringlastNameTipText()Returns the tip text for this property.StringnoteTipText()Returns the tip text for this property.StringphoneTipText()Returns the tip text for this property.voidsetAddress(String value)Sets the address.voidsetEmail(String value)Sets the email.voidsetFirstName(String value)Sets the first name.voidsetLastName(String value)Sets the last name.voidsetNote(String value)Sets the note.voidsetPhone(String value)Sets the phone.EmailContactshallowCopy()Returns a shallow copy of itself, i.e., based on the commandline options.EmailContactshallowCopy(boolean expand)Returns a shallow copy of itself, i.e., based on the commandline options.EmailAddresstoEmailAddress()Turns the contact into an email address.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_FirstName
protected String m_FirstName
the first name.
-
m_LastName
protected String m_LastName
the last name.
-
m_Email
protected String m_Email
the email address.
-
m_Address
protected String m_Address
the address.
-
m_Phone
protected String m_Phone
the phone.
-
m_Note
protected String m_Note
the note.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setFirstName
public void setFirstName(String value)
Sets the first name.- Parameters:
value- the first name
-
getFirstName
public String getFirstName()
Returns the first name.- Returns:
- the first name
-
firstNameTipText
public String firstNameTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLastName
public void setLastName(String value)
Sets the last name.- Parameters:
value- the last name
-
getLastName
public String getLastName()
Returns the last name.- Returns:
- the last name
-
lastNameTipText
public String lastNameTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setEmail
public void setEmail(String value)
Sets the email.- Parameters:
value- the email
-
getEmail
public String getEmail()
Returns the email name.- Returns:
- the email
-
emailTipText
public String emailTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPhone
public void setPhone(String value)
Sets the phone.- Parameters:
value- the phone
-
getPhone
public String getPhone()
Returns the phone.- Returns:
- the phone
-
phoneTipText
public String phoneTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setAddress
public void setAddress(String value)
Sets the address.- Parameters:
value- the address
-
getAddress
public String getAddress()
Returns the address.- Returns:
- the address
-
addressTipText
public String addressTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setNote
public void setNote(String value)
Sets the note.- Parameters:
value- the note
-
getNote
public String getNote()
Returns the note.- Returns:
- the note
-
noteTipText
public String noteTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
compareTo
public int compareTo(EmailContact o)
Compares this contact with the provided one.- Specified by:
compareToin interfaceComparable<EmailContact>- Parameters:
o- the contact to compare with- Returns:
- -1 if less than, 0 if equals, +1 if greater than the provided contact
-
equals
public boolean equals(Object obj)
Compares this object against the specified one.
-
shallowCopy
public EmailContact shallowCopy()
Returns a shallow copy of itself, i.e., based on the commandline options.- Specified by:
shallowCopyin interfaceShallowCopySupporter<EmailContact>- Returns:
- the shallow copy
-
shallowCopy
public EmailContact shallowCopy(boolean expand)
Returns a shallow copy of itself, i.e., based on the commandline options.- Specified by:
shallowCopyin interfaceShallowCopySupporter<EmailContact>- Parameters:
expand- whether to expand variables to their current values- Returns:
- the shallow copy
-
toEmailAddress
public EmailAddress toEmailAddress()
Turns the contact into an email address.- Returns:
- the generated email address
-
-