com.sun.appserv.management.util.misc
Class ListUtil

java.lang.Object
  extended by com.sun.appserv.management.util.misc.ListUtil

public final class ListUtil
extends Object


Method Summary
static
<T> void
addArray(List<T> list, T[] array)
          Add all items in an array to a list.
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[]
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addArray

public static <T> void addArray(List<T> list,
                                T[] array)
Add all items in an array to a list.


toStringArray

public static String[] toStringArray(List<?> list)
Convert a List to a String[]


newListFromCollection

public static <T> List<T> newListFromCollection(Collection<T> c)
Create a new List from a Collection


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)

reverse

public static <T> List<T> reverse(List<T> list)
Return a new List in reverse order. Because the List is new, it works on any list, modifiable or not.