Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.james.mime4j.field.address
Class AddressList

    java.lang.Object
      org.apache.james.mime4j.field.address.AddressList

    public class AddressList

extends java.lang.Object

An immutable, random-access list of Address objects.

Constructor Summary
`AddressList(java.util.ArrayList addresses, boolean dontCopy)`

Method Summary
`MailboxList` | `flatten()` Returns a flat list of all mailboxes represented in this address list.
`Address` | `get(int index)` Gets an address.
`static void` | `main(java.lang.String[] args)` Test console.
`static AddressList` | `parse(java.lang.String rawAddressList)` Parse the address list string, such as the value of a From, To, Cc, Bcc, Sender, or Reply-To header.
`void` | `print()` Dumps a representation of this address list to stdout, for debugging purposes.
`int` | `size()` The number of elements in this list.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AddressList

    public AddressList(java.util.ArrayList addresses,
                       boolean dontCopy)

Parameters:
  `addresses` - An ArrayList that contains only Address objects.
  `dontCopy` - true iff it is not possible for the addresses ArrayList to be modified by someone else.

Method Detail

### size

    public int size()

  The number of elements in this list.

### get

    public Address get(int index)

  Gets an address.

### flatten

    public MailboxList flatten()

  Returns a flat list of all mailboxes represented in this address list. Use this if you don't care about grouping.

### print

    public void print()

  Dumps a representation of this address list to stdout, for debugging purposes.

### parse

    public static AddressList parse(java.lang.String rawAddressList)
                             throws ParseException

  Parse the address list string, such as the value of a From, To, Cc, Bcc, Sender, or Reply-To header. The string MUST be unfolded already.

  Throws:
    `ParseException`

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Test console.

  Throws:
    `java.lang.Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.