org.apache.james.mime4j.dom.address
Class AddressList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<Address>
org.apache.james.mime4j.dom.address.AddressList
- All Implemented Interfaces:
- Serializable, Iterable<Address>, Collection<Address>, List<Address>
public class AddressList
- extends AbstractList<Address>
- implements Serializable
An immutable, random-access list of Address objects.
- See Also:
- Serialized Form
Method Summary |
MailboxList |
flatten()
Returns a flat list of all mailboxes represented in this address list. |
Address |
get(int index)
Gets an address. |
int |
size()
The number of elements in this list. |
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
AddressList
public AddressList(List<? extends Address> addresses,
boolean dontCopy)
- Parameters:
addresses
- A List that contains only Address objects.dontCopy
- true iff it is not possible for the addresses list to be
modified by someone else.
size
public int size()
- The number of elements in this list.
- Specified by:
size
in interface Collection<Address>
- Specified by:
size
in interface List<Address>
- Specified by:
size
in class AbstractCollection<Address>
get
public Address get(int index)
- Gets an address.
- Specified by:
get
in interface List<Address>
- Specified by:
get
in class AbstractList<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.
Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.