@Immutable public class StringList extends Object
fromQueryParam(String)
and toQueryParam()
can be used to convert back and forth between
String and StringList.Constructor and Description |
---|
StringList()
Creates a new, empty, StringList.
|
StringList(Iterable<String> fields)
Constructs the List of Strings from another List.
|
StringList(String queryParam)
Constructs the List of Strings from a query param string.
|
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableList<String> |
asList()
Returns an immutable list of strings.
|
StringList |
extend(StringList stringList)
Returns a new StringList containing the concatenation of this StringList's fields and the fields in the given
string list.
|
static StringList |
fromList(Iterable<String> strings)
Creates a new StringList from an Iterable of strings.
|
static StringList |
fromList(String... strings)
Creates a new StringList from an array of strings.
|
static StringList |
fromQueryParam(String queryParam)
Creates a new StringList from a query parameter.
|
static StringList |
joinLists(List<StringList> stringLists)
Returns a new StringList containing the concatenation of all of the StringLists in the given List.
|
String |
toQueryParam()
Returns a string representation of this StringList, suitable for using in a query param.
|
String |
toString() |
public StringList()
public StringList(@Nullable String queryParam)
queryParam
- a String containing the query param valuepublic static StringList fromList(String... strings)
strings
- an array of Stringpublic static StringList fromList(Iterable<String> strings)
strings
- an array of Stringpublic static StringList fromQueryParam(String queryParam)
queryParam
- a comma-separated String listpublic com.google.common.collect.ImmutableList<String> asList()
public String toQueryParam()
public StringList extend(StringList stringList)
stringList
- a StringListpublic static StringList joinLists(List<StringList> stringLists)
stringLists
- a List of StringListsCopyright © 2002-2022 Atlassian. All Rights Reserved.