Java List Sort sortListEntry(List firstList, List secondList)

Here you can find the source of sortListEntry(List firstList, List secondList)

Description

sort List Entry

License

Open Source License

Declaration

public static List sortListEntry(List firstList, List secondList) 

Method Source Code

//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;
    }
}

Related

  1. sortList(List list)
  2. sortList(List items)
  3. sortList(List list, boolean asc)
  4. sortListAlphabetically(List list)
  5. sortListByMapKey(List> list)
  6. sortListOfDoublesAndRemoveDuplicates(List items, double tolerance, double toleranceSmallNumbers)
  7. sortListStingArrayByFirstDes( List list)
  8. sortLocales(final List locales)
  9. sortLongSeqList(List firstList, List secondList)