Here you can find the source of combine(List> lists)
Parameter | Description |
---|---|
lists | a parameter |
T | a parameter |
public static <T> List<T> combine(List<List<T>> lists)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { /**//from w w w .j a va2 s. co m * Combines a bunch of lists inside of a large list. * @param lists * @param <T> * @return */ public static <T> List<T> combine(List<List<T>> lists) { List<T> majorList = new ArrayList<T>(); lists.forEach(majorList::addAll); return majorList; } }