public static <T>List<T> concatenate(List<List<T>> lists){
  List<T> result=new ArrayList<T>();
  for (  List<T> list : lists) {
    result.addAll(list);
  }
  return result;
}

public static < T > List < T > concatenate ( List < List < T > > lists ) { List < T > result = new ArrayList < T > ( ) ; for ( List < T > list : lists ) { result . addAll ( list ) ; } return result ; }
convert the list of lists into a single list
