adams.core.net
Class EmailContact

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.core.net.EmailContact
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, ShallowCopySupporter<EmailContact>, SizeOfHandler, Serializable, Comparable<EmailContact>

public class EmailContact
extends AbstractOptionHandler
implements Comparable<EmailContact>, ShallowCopySupporter<EmailContact>

Encapsulates an email contact.

Version:
$Revision: 6908 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  String m_Address
          the address.
protected  String m_Email
          the email address.
protected  String m_FirstName
          the first name.
protected  String m_LastName
          the last name.
protected  String m_Note
          the note.
protected  String m_Phone
          the phone.
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
EmailContact()
           
 
Method Summary
 String addressTipText()
          Returns the tip text for this property.
 int compareTo(EmailContact o)
          Compares this contact with the provided one.
 void defineOptions()
          Adds options to the internal list of options.
 String emailTipText()
          Returns the tip text for this property.
 boolean equals(Object obj)
          Compares this object against the specified one.
 String firstNameTipText()
          Returns the tip text for this property.
 String getAddress()
          Returns the address.
 String getEmail()
          Returns the email name.
 String getFirstName()
          Returns the first name.
 String getLastName()
          Returns the last name.
 String getNote()
          Returns the note.
 String getPhone()
          Returns the phone.
 String globalInfo()
          Returns a string describing the object.
 String lastNameTipText()
          Returns the tip text for this property.
 String noteTipText()
          Returns the tip text for this property.
 String phoneTipText()
          Returns the tip text for this property.
 void setAddress(String value)
          Sets the address.
 void setEmail(String value)
          Sets the email.
 void setFirstName(String value)
          Sets the first name.
 void setLastName(String value)
          Sets the last name.
 void setNote(String value)
          Sets the note.
 void setPhone(String value)
          Sets the phone.
 EmailContact shallowCopy()
          Returns a shallow copy of itself, i.e., based on the commandline options.
 EmailContact shallowCopy(boolean expand)
          Returns a shallow copy of itself, i.e., based on the commandline options.
 EmailAddress toEmailAddress()
          Turns the contact into an email address.
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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.

Constructor Detail

EmailContact

public EmailContact()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class AbstractOptionHandler
Returns:
a description suitable for displaying in the gui

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractOptionHandler

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:
compareTo in interface Comparable<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.

Overrides:
equals in class Object
Parameters:
obj - the object to compare with
Returns:
true if the same object

shallowCopy

public EmailContact shallowCopy()
Returns a shallow copy of itself, i.e., based on the commandline options.

Specified by:
shallowCopy in interface ShallowCopySupporter<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:
shallowCopy in interface ShallowCopySupporter<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


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.