public final class ListUtil extends Object
Modifier and Type | Method and Description |
---|---|
static <T> void |
addArray(List<T> list,
T[] array)
Add all items in an array to a list.
|
static List<String> |
asStringList(Object value) |
static <T> List<T> |
newList() |
static <T> List<T> |
newList(Enumeration<T> e) |
static <T> List<T> |
newList(T m1)
Create a new List with one member.
|
static <T> List<T> |
newList(T m1,
T m2)
Create a new List with two members.
|
static <T> List<T> |
newList(T m1,
T m2,
T m3)
Create a new List with three members.
|
static <T> List<T> |
newList(T m1,
T m2,
T m3,
T m4)
Create a new List with four members.
|
static <T> List<T> |
newList(T m1,
T m2,
T m3,
T m4,
T m5)
Create a new List with four members.
|
static <T> List<T> |
newListFromArray(T[] items) |
static <T> List<T> |
newListFromCollection(Collection<T> c)
Create a new List from a Collection
|
static <T> List<? extends T> |
newListFromIterator(Iterator<? extends T> iter)
Create a new List from a Collection
|
static <T> List<T> |
reverse(List<T> list)
Return a new List in reverse order.
|
static String[] |
toStringArray(List<?> list)
Convert a List to a String[]
|
public static <T> void addArray(List<T> list, T[] array)
public static <T> List<T> newList()
public static <T> List<T> newListFromCollection(Collection<T> c)
public static <T> List<T> newList(Enumeration<T> e)
public static <T> List<? extends T> newListFromIterator(Iterator<? extends T> iter)
public static <T> List<T> newList(T m1)
public static <T> List<T> newList(T m1, T m2)
public static <T> List<T> newList(T m1, T m2, T m3)
public static <T> List<T> newList(T m1, T m2, T m3, T m4)
public static <T> List<T> newList(T m1, T m2, T m3, T m4, T m5)
public static <T> List<T> newListFromArray(T[] items)
Copyright © 2020. All rights reserved.