grendel.storage.addressparser
Class RFC822Mailbox

java.lang.Object
  |
  +--grendel.storage.addressparser.RFC822Mailbox

public class RFC822Mailbox
extends java.lang.Object

Stores a RFC822 mailbox. Defined as being either a addr-spec (local-part@domain), or a route-addr preceeded by a phrase (phrase <local-part@domain>).

Mere humans tends to consider this a name and an address. In the first addr-spec form, the name is usually within a RFC822 comment preceeding the addr-spec. If there is no comment, a mailbox name may be null.

Normally used only as a data type returned by the RFC822MailboxList class.

See Also:
RFC822MailboxList

Constructor Summary
RFC822Mailbox(java.lang.String name, java.lang.String address)
          Should be created only by the RFC822MailboxList class.
 
Method Summary
 java.lang.String getAddress()
           
 java.lang.String getMailboxString()
          Creates a valid RFC822 mailbox.
 java.lang.String getName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RFC822Mailbox

public RFC822Mailbox(java.lang.String name,
                     java.lang.String address)
Should be created only by the RFC822MailboxList class.
See Also:
RFC822MailboxList
Method Detail

getName

public java.lang.String getName()

getAddress

public java.lang.String getAddress()

getMailboxString

public java.lang.String getMailboxString()
Creates a valid RFC822 mailbox. Since we don't like to lose the comment information, this will reform addresses like:
(Eric Bina) ebina@netscape.com
to addresses like:
"Eric Bina" <ebina@netscape.com>