Class EmailAddress
java.lang.Object
org.apache.tools.ant.taskdefs.email.EmailAddress
public class EmailAddress
extends java.lang.Object
Holds an email address.
- Since:
- Ant 1.5
-
Constructor Summary
Constructors Constructor Description EmailAddress()
Creates an empty email addressEmailAddress(java.lang.String email)
Creates a new email address based on the given string -
Method Summary
Modifier and Type Method Description java.lang.String
getAddress()
Returns the addressjava.lang.String
getName()
Returns the display namevoid
setAddress(java.lang.String address)
Sets the email address.void
setName(java.lang.String name)
Sets the personal / display name of the address.java.lang.String
toString()
Constructs a string "name <address>" or "address"
-
Constructor Details
-
EmailAddress
public EmailAddress()Creates an empty email address -
EmailAddress
public EmailAddress(java.lang.String email)Creates a new email address based on the given string- Parameters:
email
- the email address (with or without <>) Acceptable forms include: address <address> name <address> <address> name (name) address address (name)
-
-
Method Details
-
setName
public void setName(java.lang.String name)Sets the personal / display name of the address.- Parameters:
name
- the display name
-
setAddress
public void setAddress(java.lang.String address)Sets the email address.- Parameters:
address
- the actual email address (without <>)
-
toString
public java.lang.String toString()Constructs a string "name <address>" or "address"- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of the address
-
getAddress
public java.lang.String getAddress()Returns the address- Returns:
- the address part
-
getName
public java.lang.String getName()Returns the display name- Returns:
- the display name part
-