rsvp.model
Interface EmailAddressInterface

All Known Implementing Classes:
EmailAddress

public interface EmailAddressInterface


Field Summary
static long serialVersionUID
           
 
Method Summary
 java.lang.String getDisplayEmail()
          Returns the "displayable form" of the responder's email address.
 java.lang.String getEmail()
          Returns the address, as a String.
 void setEmail(java.lang.String email)
          Sets this email address to the given String.
 java.lang.String toString()
          Returns a String representation of this email address.
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Method Detail

toString

java.lang.String toString()
Returns a String representation of this email address.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this email address.

setEmail

void setEmail(java.lang.String email)
Sets this email address to the given String. If the given String does not correspond to a "valid" email address, this method will throw a BogusParameterException.

Parameters:
email - an email address; must be "valid," as defined by EmailAddress.isValid(String)

getDisplayEmail

java.lang.String getDisplayEmail()

Returns the "displayable form" of the responder's email address. This is obscured somewhat to prevent spam. The "displayable form" of an email address consists of:

  1. the username (that is, the part before the "@"),
  2. an at symbol,
  3. the first character of the domain name,
  4. an ellipsis (...), and
  5. the top-level domain of the domain name (e.g. com, org, or edu)

As an example, the email address fred@flintstones.bedrock.gov would have the displayable form fred@f...gov

Precondition: this EmailAddress has been initialized with a String corresponding to a valid email address. If this is not the case, this method will throw a StateException.

Returns:
the "displayable form" of the responder's email address.

getEmail

java.lang.String getEmail()

Returns the address, as a String.

Precondition: this EmailAddress has been initialized with a String corresponding to a valid email address. If this is not the case, this method will throw an exception.

Returns:
the address, as a String.