Here you can find the source of mergeList(List
public static <T> List<T> mergeList(List<T> list, List<T>... others)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static <T> List<T> mergeList(List<T> list, List<T>... others) { List<T> result = list == null ? new ArrayList<>() : new ArrayList<>(list); for (List<T> other : others) result.addAll(other);//from w w w . j a v a 2 s .c om return result; } }