public class ListUtil
extends java.lang.Object
java.util.List
instances.Constructor and Description |
---|
ListUtil() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
commaSeparatedList(java.lang.String string)
Creates a List of String objects from the given comma-separated String.
|
static java.lang.String |
commaSeparatedString(java.util.List<java.lang.String> list,
boolean quoteStrings)
Creates a comma-separated String from the given List of String objects.
|
static <T> java.util.List<T> |
concatenate(java.util.List<T> list1,
java.util.List<T> list2)
Returns a List instance that contains the elements of the two given List instances.
|
static java.util.List<java.lang.String> |
filter(java.util.Collection<java.lang.String> list,
StringMatcher filter)
Returns the subset of the given list, containing all strings that match the given filter.
|
static void |
main(java.lang.String[] args) |
static int[] |
toIntArray(java.util.List<java.lang.Integer> integerList)
Converts a List of Integers to an int array.
|
public static <T> java.util.List<T> concatenate(java.util.List<T> list1, java.util.List<T> list2)
public static java.util.List<java.lang.String> filter(java.util.Collection<java.lang.String> list, StringMatcher filter)
public static java.lang.String commaSeparatedString(java.util.List<java.lang.String> list, boolean quoteStrings)
public static java.util.List<java.lang.String> commaSeparatedList(java.lang.String string)
public static int[] toIntArray(java.util.List<java.lang.Integer> integerList)
integerList
- the List of Integers to convert.public static void main(java.lang.String[] args)