public class StringList extends ArrayList<String>
Note that the toString()
method just joins the strings together
using commas with no escaping. This will give unexpected results if any
of the strings in the list contains commas, but that should not be the
case for any of the strings used by the web service API methods.
Constructor and Description |
---|
StringList()
Constructs an empty string list with an initial capacity of ten.
|
StringList(Collection<String> c)
Constructs a string list containing the elements of the specified
collection, in the order they are returned by the collection's
iterator.
|
StringList(int initialCapacity)
Constructs an empty string list with the specified initial capacity.
|
StringList(String... strings)
Constructs a string list from the specified strings.
|
Modifier and Type | Method and Description |
---|---|
String |
toString()
Represents the string list as a comma-separated string, suitable for
use as a parameter in various web service API methods.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll
containsAll, equals, hashCode
parallelStream, stream
public StringList(int initialCapacity)
initialCapacity
- the initial capacity of the list.public StringList()
public StringList(Collection<String> c)
c
- the collection whose elements are to be placed into this
list.public StringList(String... strings)
strings
- the strings to place into this list.public String toString()
toString
in class AbstractCollection<String>