Class DomainList
- All Implemented Interfaces:
Serializable,Iterable<String>,Collection<String>,List<String>
An immutable, random-access list of Strings (that are supposedly domain names
or domain literals).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionDomainList(String... domains) DomainList(List<String> domains) DomainList(List<String> domains, boolean dontCopy) -
Method Summary
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, streamMethods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
domains
-
-
Constructor Details
-
DomainList
- Parameters:
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.
-
DomainList
- Parameters:
domains- A List that contains only String objects.
-
DomainList
- Parameters:
domains- A List that contains only String objects.
-
-
Method Details
-
size
public int size()The number of elements in this list.- Specified by:
sizein interfaceCollection<String>- Specified by:
sizein interfaceList<String>- Specified by:
sizein classAbstractCollection<String>
-
get
Gets the domain name or domain literal at the specified index.- Specified by:
getin interfaceList<String>- Specified by:
getin classAbstractList<String>- Throws:
IndexOutOfBoundsException- If index is < 0 or >= size().
-
toRouteString
Returns the list of domains formatted as a route string (not including the trailing ':'). -
toString
- Overrides:
toStringin classAbstractCollection<String>
-