public final class DomainList extends AbstractList<String> implements Serializable
modCount
Constructor and Description |
---|
DomainList(List<String> domains) |
DomainList(List<String> domains,
boolean dontCopy) |
DomainList(String... domains) |
Modifier and Type | Method and Description |
---|---|
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() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public DomainList(List<String> domains, boolean dontCopy)
domains
- A List that contains only String objects.dontCopy
- true iff it is not possible for the addresses list to be
modified by someone else.public DomainList(List<String> domains)
domains
- A List that contains only String objects.public DomainList(String... domains)
domains
- A List that contains only String objects.public int size()
size
in interface Collection<String>
size
in interface List<String>
size
in class AbstractCollection<String>
public String get(int index)
get
in interface List<String>
get
in class AbstractList<String>
IndexOutOfBoundsException
- If index is < 0 or >= size().public String toRouteString()
public String toString()
toString
in class AbstractCollection<String>
Copyright © 2004–2023 The Apache Software Foundation. All rights reserved.