Java List Concatenate concat(final List list1, final List list2)

Here you can find the source of concat(final List list1, final List list2)

Description

concat

License

Open Source License

Declaration

public static <E> List<E> concat(final List<E> list1, final List<E> list2) 

Method Source Code

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

import java.util.*;

public class Main {
    public static <E> List<E> concat(final List<E> list1, final List<E> list2) {
        if (list1 == null || list2 == null)
            throw new NullPointerException("Not initizalized lists");
        List<E> concat = new ArrayList<E>(list1.size() + list2.size());
        concat.addAll(list1);/*from w  w w  .j av  a 2  s. co  m*/
        concat.addAll(list2);
        return concat;
    }
}

Related

  1. ByteConcatenator(List instructionbytes, int num)
  2. concat(Collection> lists)
  3. concat(Collection list1, Collection list2)
  4. concat(final byte[] result, final List buffers)
  5. concat(final Collection... lists)
  6. concat(List list)
  7. concat(List l1, List l2)
  8. concat(List list1, List list2)
  9. concat(List list, String delim)