Here you can find the source of splice(List
Parameter | Description |
---|---|
list1 | a parameter |
list2 | a parameter |
public static <T> List<T> splice(List<T> list1, List<T> list2)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { /**//from ww w . j a va 2 s . co m * Splices the input lists into a single list * * @param list1 * @param list2 * * @return */ public static <T> List<T> splice(List<T> list1, List<T> list2) { List<T> outputList = new ArrayList<T>(); outputList.addAll(list1); outputList.addAll(list2); return outputList; } }