Here you can find the source of sortListEntry(List firstList, List secondList)
public static List sortListEntry(List firstList, List secondList)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static List sortListEntry(List firstList, List secondList) { List entrys = new ArrayList(); if (firstList != null && firstList.size() > 0) { for (int i = 0; i < firstList.size(); i++) { entrys.add(i, firstList.get(i)); }//from w w w.j ava2 s . c om if (secondList != null && secondList.size() > 0) { for (int j = firstList.size(); j < firstList.size() + secondList.size(); j++) { entrys.add(j, secondList.get(j - firstList.size())); } } } else { if (secondList != null && secondList.size() > 0) { entrys.addAll(secondList); } } return entrys; } }