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 AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionDomainList(String... domains) DomainList(List<String> domains) DomainList(List<String> domains, boolean dontCopy) -
Method Summary
Methods inherited from class AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods inherited from interface Collection
parallelStream, removeIf, streamMethods inherited from interface 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
-
DomainList
-
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>
-