org.apache.james.mime4j.field.address
Class DomainList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<String>
org.apache.james.mime4j.field.address.DomainList
- All Implemented Interfaces:
- Serializable, Iterable<String>, Collection<String>, List<String>
public class DomainList
- extends AbstractList<String>
- implements Serializable
An immutable, random-access list of Strings (that are supposedly domain names
or domain literals).
- See Also:
- Serialized Form
Method Summary |
String |
get(int index)
Gets the domain name or domain literal at the specified index. |
int |
size()
The number of elements in this list. |
String |
toRouteString()
Returns the list of domains formatted as a route string (not including
the trailing ':'). |
String |
toString()
|
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
DomainList
public DomainList(List<String> domains,
boolean dontCopy)
- Parameters:
domains
- A List that contains only String objects.dontCopy
- true iff it is not possible for the domains list to be
modified by someone else.
size
public int size()
- The number of elements in this list.
- Specified by:
size
in interface Collection<String>
- Specified by:
size
in interface List<String>
- Specified by:
size
in class AbstractCollection<String>
get
public String get(int index)
- Gets the domain name or domain literal at the specified index.
- Specified by:
get
in interface List<String>
- Specified by:
get
in class AbstractList<String>
- Throws:
IndexOutOfBoundsException
- If index is < 0 or >= size().
toRouteString
public String toRouteString()
- Returns the list of domains formatted as a route string (not including
the trailing ':').
toString
public String toString()
- Overrides:
toString
in class AbstractCollection<String>
Copyright © 2004-2012 JBoss by Red Hat. All Rights Reserved.