Java List Combine combineLists(List a, List b)

Here you can find the source of combineLists(List a, List b)

Description

Combine lists.

License

Open Source License

Parameter

Parameter Description
a the first list
b the second list

Return

the result of combining both lists

Declaration

public static <E> List<E> combineLists(List<E> a, List<E> b) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;
import java.util.List;

public class Main {
    /**/*from ww  w .  ja va 2  s  . com*/
     * Combine lists.
     * 
     * @param a the first list
     * @param b the second list
     * @return the result of combining both lists
     */
    public static <E> List<E> combineLists(List<E> a, List<E> b) {
        ArrayList<E> result = new ArrayList<E>();

        result.addAll(a);
        result.addAll(b);

        return result;
    }
}

Related

  1. combineAux(List> collections, List objectAccumulator, List> resultList)
  2. combineFloat(List nums)
  3. combineLines(List lines)
  4. combineList(List l1, List l2)
  5. combineLists(List keys, List values)
  6. combineString(List lstInput, String strToken)
  7. combineStringList(List sList)
  8. combineSubtractArrays(List a1, List a2)
  9. getCombinedColumnName(final List columnNames, final boolean sortByName)