Class EmailAddress

  • All Implemented Interfaces:
    Serializable

    public class EmailAddress
    extends Object
    implements Serializable
    This class represents an email address with the address (first.last@xyz.com) and an optional name, e. g. First Last.
    See Also:
    Serialized Form
    • Constructor Detail

      • EmailAddress

        public EmailAddress​(String address)
        Creates a new EmailAddress for the designated address (and no name).
        Parameters:
        address - The address for which to create a new EmailAddress.
      • EmailAddress

        public EmailAddress​(String name,
                            String address)
        Creates a new EmailAddress for the designated name and address.
        Parameters:
        name - The human-readable name for which to create a new EmailAddress. This must not be empty but it may be null.
        address - The address for which to create a new EmailAddress.
    • Method Detail

      • getName

        public String getName()
        Gets the human-readable name of this EmailAddress or null.
        Returns:
        The human-readable name of this EmailAddress or null.
      • getAddress

        public String getAddress()
        Gets the mail address of this EmailAddress.
        Returns:
        The mail address of this EmailAddress.