Class TextareaStringListUtility
java.lang.Object
jp.ikedam.jenkins.plugins.extensible_choice_parameter.utility.TextareaStringListUtility
Utility Class to work with a list of strings in a textarea.
Strings are written in each line of a textarea.
Each line must be ended with new line codes (LF or CRLF).
If there is a string after the last new line code,
that string will be treated as a last string.
white spaces are never trimmed.
Here is a examples:
textarea | list of string |
---|---|
a[LF] b[LF] c[LF] |
"a", "b", "c" |
a[LF] b[LF] c[LF] |
"a", "b", "c" |
a[LF] b[LF] c[LF] [LF] |
"a", "b", "c", "" |
[LF] |
"" |
(empty list) | |
(null) | (empty list) |
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstringListFromTextarea
(String choiceListText) Returns a list of string parsed from a input of textarea.static String
textareaFromStringList
(List<String> stringList) Join the list of strings into a text.
-
Constructor Details
-
TextareaStringListUtility
public TextareaStringListUtility()
-
-
Method Details
-
stringListFromTextarea
Returns a list of string parsed from a input of textarea.- Parameters:
choiceListText
- the input of a textarea- Returns:
- a list of string.
-
textareaFromStringList
Join the list of strings into a text. Each string will end with LF.- Parameters:
stringList
- a list of strings to join.- Returns:
- a text the strings joined.
-