Java List Concatenate concat(List l1, List l2)

Here you can find the source of concat(List l1, List l2)

Description

concat

License

Open Source License

Declaration

public static <T> List<? extends T> concat(List<? extends T> l1, List<? extends T> l2) 

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 <T> List<? extends T> concat(List<? extends T> l1, List<? extends T> l2) {
        List<T> list = new ArrayList<>();
        list.addAll(l1);//from  w  w  w  .j a va2  s. c o m
        list.addAll(l2);
        return list;
    }
}

Related

  1. concat(Collection list1, Collection list2)
  2. concat(final byte[] result, final List buffers)
  3. concat(final Collection... lists)
  4. concat(final List list1, final List list2)
  5. concat(List list)
  6. concat(List list1, List list2)
  7. concat(List list, String delim)
  8. concat(List lista, List listb)
  9. concat(List items, String quotation, String separation)