Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; public class Main { public static <T> List<T> ToList(Collection<List<T>> values) { List<T> alllist = new ArrayList<T>(); Iterator<List<T>> iterator = values.iterator(); List<T> list = null; while (iterator.hasNext()) { list = (List<T>) iterator.next(); alllist.addAll(list); } return alllist; } }