Class DomainList
- All Implemented Interfaces:
Serializable
,Iterable<String>
,Collection<String>
,List<String>
,SequencedCollection<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 long
Fields 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, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, 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:
size
in interfaceCollection<String>
- Specified by:
size
in interfaceList<String>
- Specified by:
size
in classAbstractCollection<String>
-
get
Gets the domain name or domain literal at the specified index.- Specified by:
get
in interfaceList<String>
- Specified by:
get
in 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:
toString
in classAbstractCollection<String>
-