public class StringArrayUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String[] |
EMPTY_ARRAY |
| Constructor and Description |
|---|
StringArrayUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String[] |
addToArray(String[] items,
String str)
Adds a string to a string array.
|
static void |
addToList(List<String> list,
String[] toAdd)
Adds a string array to alist of strings
|
static String |
clean(String s)
Remove all leading/trailing whitespace, and replace multiple spaces between text to a single space
|
static String |
concat(String... strings) |
static String |
formatList(String[] items)
Create a string representation of a string array
|
static boolean |
isBlank(String[] array)
Check if an array is empty
|
static boolean |
isNotBlank(String[] array)
Check if an array is not empty
|
static boolean |
isNotBlankList(List<String> array)
Check if an array is not empty
|
static String[] |
splitWebParameter(String[] array)
Create a normalized array from web parameters, which can be array of strings concatenated by space, + or ,.
|
static String[] |
toArray(List<String> list)
Convert a list to array
|
static String[] |
toArray(String... items) |
static List<String> |
toList(String... items) |
static Set<String> |
toSet(String... items) |
public static final String[] EMPTY_ARRAY
public static boolean isNotBlank(String[] array)
array - public static boolean isNotBlankList(List<String> array)
array - public static boolean isBlank(String[] array)
array - public static String[] toArray(List<String> list)
list - public static void addToList(List<String> list, String[] toAdd)
list - toAdd - public static String formatList(String[] items)
items - public static String[] addToArray(String[] items, String str)
items - The array to append data instr - The string to appendpublic static String clean(String s)
s - Copyright © 2017 Europeana Foundation. All rights reserved.