EmailAddress (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs.email, class: EmailAddress

Package org.apache.tools.ant.taskdefs.email

# Class EmailAddress

java.lang.Object
org.apache.tools.ant.taskdefs.email.EmailAddress

public class EmailAddress extends Object
Holds an email address.

Since:
  Ant 1.5

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EmailAddress()`
  Creates an empty email address
  `EmailAddress(String email)`
  Creates a new email address based on the given string

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getAddress()`
  Returns the address
  `String`
  `getName()`
  Returns the display name
  `void`
  `setAddress(String address)`
  Sets the email address.
  `void`
  `setName(String name)`
  Sets the personal / display name of the address.
  `String`
  `toString()`
  Constructs a string "name <address>" or "address"

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### EmailAddress

    public EmailAddress()
    Creates an empty email address

  - ### EmailAddress

    public EmailAddress(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(String name)
    Sets the personal / display name of the address.
    Parameters:
      `name` - the display name

  - ### setAddress

    public void setAddress(String address)
    Sets the email address.
    Parameters:
      `address` - the actual email address (without <>)

  - ### toString

    public String toString()
    Constructs a string "name <address>" or "address"
    Overrides:
      `toString` in class `Object`
    Returns:
      a string representation of the address

  - ### getAddress

    public String getAddress()
    Returns the address
    Returns:
      the address part

  - ### getName

    public String getName()
    Returns the display name
    Returns:
      the display name part