Here you can find the source of combineArray(List
Parameter | Description |
---|---|
T | a parameter |
p | List of object lists concerned |
public static <T> List<T> combineArray(List<T>... p)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { /**//from w ww .ja v a 2 s .c om * Combine a list of object lists into one list * @param <T> * @param p List of object lists concerned * @return Combined list */ public static <T> List<T> combineArray(List<T>... p) { List<T> c = new ArrayList<T>(); for (int i = 0; i < p.length; ++i) { for (T pl : p[i]) { c.add(pl); } } return c; } }