Package org.glassfish.admin.amx.util
Class ListUtil
- java.lang.Object
-
- org.glassfish.admin.amx.util.ListUtil
-
public final class ListUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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 Collectionstatic <T> List<? extends T>
newListFromIterator(Iterator<? extends T> iter)
Create a new List from a Collectionstatic <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[]
-
-
-
Method Detail
-
addArray
public static <T> void addArray(List<T> list, T[] array)
Add all items in an array to a list.
-
newList
public static <T> List<T> newList()
-
newListFromCollection
public static <T> List<T> newListFromCollection(Collection<T> c)
Create a new List from a Collection
-
newList
public static <T> List<T> newList(Enumeration<T> e)
-
newListFromIterator
public static <T> List<? extends T> newListFromIterator(Iterator<? extends T> iter)
Create a new List from a Collection
-
newList
public static <T> List<T> newList(T m1)
Create a new List with one member.
-
newList
public static <T> List<T> newList(T m1, T m2)
Create a new List with two members.
-
newList
public static <T> List<T> newList(T m1, T m2, T m3)
Create a new List with three members.
-
newList
public static <T> List<T> newList(T m1, T m2, T m3, T m4)
Create a new List with four members.
-
newList
public static <T> List<T> newList(T m1, T m2, T m3, T m4, T m5)
Create a new List with four members.
-
newListFromArray
public static <T> List<T> newListFromArray(T[] items)
-
-