@Test public void testMailboxList() throws Exception { Mailbox mailbox1 = DefaultAddressParser.DEFAULT.parseMailbox("JD <john.doe@acme.org>"); Mailbox mailbox2 = DefaultAddressParser.DEFAULT.parseMailbox("Mary Smith <mary@example.net>"); MailboxListField field = Fields.mailboxList("Resent-From", Arrays .asList(mailbox1, mailbox2)); Assert.assertEquals("Resent-From: JD <john.doe@acme.org>, " + "Mary Smith <mary@example.net>", decode(field)); }
public static MailboxListField mailboxList(String fieldName, Iterable<Mailbox> mailboxes) { checkValidFieldName(fieldName); return mailboxList0(fieldName, mailboxes); }
Fields { public static MailboxListField mailboxList(String fieldName, Iterable<Mailbox> mailboxes) { checkValidFieldName(fieldName); return mailboxList0(fieldName, mailboxes); } }
Fields { public static MailboxListField mailboxList(String fieldName, Iterable<Mailbox> mailboxes) { checkValidFieldName(fieldName); return mailboxList0(fieldName, mailboxes); } private  Fields(); }
Fields { public static MailboxListField mailboxList(String fieldName, Iterable<Mailbox> mailboxes) { checkValidFieldName(fieldName); return mailboxList0(fieldName, mailboxes); } private  Fields(); static MimeVersionField version(String ver); static ContentTypeField contentType(String contentType); static ContentTypeField contentType(String mimeType,
            Map<String, String> parameters); static ContentTypeField contentType(String mimeType,
                                               Iterable<NameValuePair> parameters); static ContentTypeField contentType(String mimeType, NameValuePair... parameters); static ContentTransferEncodingField contentTransferEncoding(
            String contentTransferEncoding); static ContentDispositionField contentDisposition(
            String contentDisposition); static ContentDispositionField contentDisposition(
            String dispositionType, Map<String, String> parameters); static ContentDispositionField contentDisposition(
            String dispositionType, Iterable<NameValuePair> parameters); static ContentDispositionField contentDisposition(
            String dispositionType, String filename); static ContentDispositionField contentDisposition(
            String dispositionType, String filename, long size); static ContentDispositionField contentDisposition(
            String dispositionType, String filename, long size,
            Date creationDate, Date modificationDate, Date readDate); static DateTimeField date(Date date); static DateTimeField date(String fieldName, Date date); static DateTimeField date(String fieldName, Date date, TimeZone zone); static UnstructuredField generateMessageId(String hostname); static UnstructuredField messageId(String messageId); static UnstructuredField subject(String subject); static MailboxField sender(Mailbox mailbox); static MailboxListField from(Mailbox mailbox); static MailboxListField from(Mailbox... mailboxes); static MailboxListField from(Iterable<Mailbox> mailboxes); static AddressListField to(Address address); static AddressListField to(Address... addresses); static AddressListField to(Iterable<Address> addresses); static AddressListField cc(Address address); static AddressListField cc(Address... addresses); static AddressListField cc(Iterable<Address> addresses); static AddressListField bcc(Address address); static AddressListField bcc(Address... addresses); static AddressListField bcc(Iterable<Address> addresses); static AddressListField replyTo(Address address); static AddressListField replyTo(Address... addresses); static AddressListField replyTo(Iterable<Address> addresses); static MailboxField mailbox(String fieldName, Mailbox mailbox); static MailboxListField mailboxList(String fieldName,
            Iterable<Mailbox> mailboxes); static AddressListField addressList(String fieldName,
            Iterable<? extends Address> addresses); }
Fields { public static MailboxListField mailboxList(String fieldName, Iterable<Mailbox> mailboxes) { checkValidFieldName(fieldName); return mailboxList0(fieldName, mailboxes); } private  Fields(); static MimeVersionField version(String ver); static ContentTypeField contentType(String contentType); static ContentTypeField contentType(String mimeType,
            Map<String, String> parameters); static ContentTypeField contentType(String mimeType,
                                               Iterable<NameValuePair> parameters); static ContentTypeField contentType(String mimeType, NameValuePair... parameters); static ContentTransferEncodingField contentTransferEncoding(
            String contentTransferEncoding); static ContentDispositionField contentDisposition(
            String contentDisposition); static ContentDispositionField contentDisposition(
            String dispositionType, Map<String, String> parameters); static ContentDispositionField contentDisposition(
            String dispositionType, Iterable<NameValuePair> parameters); static ContentDispositionField contentDisposition(
            String dispositionType, String filename); static ContentDispositionField contentDisposition(
            String dispositionType, String filename, long size); static ContentDispositionField contentDisposition(
            String dispositionType, String filename, long size,
            Date creationDate, Date modificationDate, Date readDate); static DateTimeField date(Date date); static DateTimeField date(String fieldName, Date date); static DateTimeField date(String fieldName, Date date, TimeZone zone); static UnstructuredField generateMessageId(String hostname); static UnstructuredField messageId(String messageId); static UnstructuredField subject(String subject); static MailboxField sender(Mailbox mailbox); static MailboxListField from(Mailbox mailbox); static MailboxListField from(Mailbox... mailboxes); static MailboxListField from(Iterable<Mailbox> mailboxes); static AddressListField to(Address address); static AddressListField to(Address... addresses); static AddressListField to(Iterable<Address> addresses); static AddressListField cc(Address address); static AddressListField cc(Address... addresses); static AddressListField cc(Iterable<Address> addresses); static AddressListField bcc(Address address); static AddressListField bcc(Address... addresses); static AddressListField bcc(Iterable<Address> addresses); static AddressListField replyTo(Address address); static AddressListField replyTo(Address... addresses); static AddressListField replyTo(Iterable<Address> addresses); static MailboxField mailbox(String fieldName, Mailbox mailbox); static MailboxListField mailboxList(String fieldName,
            Iterable<Mailbox> mailboxes); static AddressListField addressList(String fieldName,
            Iterable<? extends Address> addresses);  }