Package proguard.util
Class ListUtil
- java.lang.Object
-
- proguard.util.ListUtil
-
public class ListUtil extends java.lang.Object
This class provides some utility methods for working withjava.util.List
instances.
-
-
Constructor Summary
Constructors Constructor Description ListUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
concatenate
public 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. The instances may be null. If both instances are null, the result is null too.
-
filter
public 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.
-
commaSeparatedString
public 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.
-
commaSeparatedList
public static java.util.List<java.lang.String> commaSeparatedList(java.lang.String string)
Creates a List of String objects from the given comma-separated String.
-
toIntArray
public static int[] toIntArray(java.util.List<java.lang.Integer> integerList)
Converts a List of Integers to an int array.- Parameters:
integerList
- the List of Integers to convert.- Returns:
- the corresponding int array.
-
main
public static void main(java.lang.String[] args)
-
-