Here you can find the source of mergeTo(List
public static void mergeTo(List<Object> target, List<Object> source)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static void mergeTo(List<Object> target, List<Object> source) { if ((target == null) || (source == null)) { return; }/*from w w w. j a v a 2s . co m*/ target.addAll(source); } }