|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.rest.api.util.StringList
@Immutable public class StringList
This class is used for dealing with query parameters that contain comma-separated lists of strings. The utility
methods fromQueryParam(String) and toQueryParam() can be used to convert back and forth between
String and StringList.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StringList()
public StringList(@Nullable
String queryParam)
queryParam - a String containing the query param value
public StringList(@Nullable
Iterable<String> fields)
fields - a List of Strings| Method Detail |
|---|
public static StringList fromList(String... strings)
strings - an array of String
public static StringList fromList(Iterable<String> strings)
strings - an array of String
public static StringList fromQueryParam(String queryParam)
queryParam - a comma-separated String list
public com.google.common.collect.ImmutableList<String> asList()
public String toQueryParam()
public StringList extend(StringList stringList)
stringList - a StringList
public static StringList joinLists(List<StringList> stringLists)
stringLists - a List of StringLists
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||