Here you can find the source of joinLists( final List> lists)
public static <GPItem> List<GPItem> joinLists( final List<List<GPItem>> lists)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { /**/*ww w . j a v a2 s . c o m*/ * Joins the items of multiple lists into one list. * * @return */ public static <GPItem> List<GPItem> joinLists( final List<List<GPItem>> lists) { if (lists.size() == 0) { return new ArrayList<GPItem>(0); } final List<GPItem> joined = new ArrayList<GPItem>(lists.size() * lists.get(0).size()); for (final List<GPItem> list : lists) { joined.addAll(list); } return joined; } }