Package io.sf.carte.doc
Class ArrayStringList
- All Implemented Interfaces:
StringList
,Serializable
,Cloneable
,Iterable<String>
,Collection<String>
,List<String>
,RandomAccess
,DOMStringList
Implementation of
StringList
based on ArrayList
.- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorDescriptionConstructs an empty list with aArrayList
's default initial capacity.ArrayStringList
(int initialCapacity) Constructs an empty list with the specified initial capacity.ArrayStringList
(Collection<? extends String> c) Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. -
Method Summary
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
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
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
ArrayStringList
public ArrayStringList()Constructs an empty list with aArrayList
's default initial capacity. -
ArrayStringList
public ArrayStringList(int initialCapacity) Constructs an empty list with the specified initial capacity.- Parameters:
initialCapacity
- the initial capacity of the list.- Throws:
IllegalArgumentException
- if the specified initial capacity is negative.
-
ArrayStringList
Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.- Parameters:
c
- the collection whose elements are to be placed into this list.- Throws:
NullPointerException
- if the specified collection is null.
-
-
Method Details
-
item
- Specified by:
item
in interfaceDOMStringList
-
getLength
public int getLength()- Specified by:
getLength
in interfaceDOMStringList
-
contains
- Specified by:
contains
in interfaceDOMStringList
-