public static <T>List<T> toList(T... items){
  if (items == null)   return null;
  List<T> list=new ArrayList<T>(items.length);
  for (  T item : items)   list.add(item);
  return list;
}

public static < T > List < T > toList ( T ... items ) { if ( items == null ) return null ; List < T > list = new ArrayList < T > ( items . length ) ; for ( T item : items ) list . add ( item ) ; return list ; }
converts the supplied array into a list .
