1 6 package tests.jfun.parsec.rfc822; 7 8 13 public class Address { 14 private final String [] phrase; 15 private final Mailbox[] mailboxes; 16 public String toString(){ 17 if(phrase.length==0) 18 return ToString.printMailboxes(mailboxes); 19 else return ToString.printPhrase(phrase) 20 + ":" + ToString.printMailboxes(mailboxes) 21 + ";"; 22 } 23 27 public Address(final String [] phrase, final Mailbox[] mailboxes) { 28 this.phrase = phrase; 29 this.mailboxes = mailboxes; 30 } 31 34 public Mailbox[] getMailboxes() { 35 return mailboxes; 36 } 37 40 public String [] getPhrase() { 41 return phrase; 42 } 43 } 44 | Popular Tags |