Java Collection Concatenate concat(Collection first, Collection second)

Here you can find the source of concat(Collection first, Collection second)

Description

concat

License

Open Source License

Declaration

public static <T> List<T> concat(Collection<T> first, Collection<T> second) 

Method Source Code


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

import java.util.*;

public class Main {
    public static <T> List<T> concat(Collection<T> first, Collection<T> second) {
        List<T> objs = new ArrayList<>();
        objs.addAll(first);//from  www.  j a  v a 2  s .c  o  m
        objs.addAll(second);

        return objs;
    }
}

Related

  1. concat(Collection items)
  2. concat(Collection parts, int start, String defaultText)
  3. concat(Collection pieces, String delim)
  4. concat(Collection a, Collection b)
  5. concat(Collection a, int offset, String sep, String start, String end)
  6. concat(Collection... collections)
  7. concat(final Collection... collections)
  8. concat(final Collection... collections)
  9. concat(String separator, Collection args)