Java List Merge merge(final List a, final List b)

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

Description

merge

License

Open Source License

Declaration

public static <T> List<T> merge(final List<T> a, final List<T> b) 

Method Source Code

//package com.java2s;
/**//from   w ww.  ja v a2s . c  o  m
 * Copyright (c) 2011 Loganalysis team and contributors
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   Raffael Schmid - initial API and implementation
 */

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static <T> List<T> merge(final List<T> a, final List<T> b) {
        final List<T> retVal = new ArrayList<T>();
        retVal.addAll(a);
        retVal.addAll(b);
        return retVal;
    }
}

Related

  1. getMergedSpeakerList()
  2. getMergeindexes(List spans, List indexes)
  3. mapMergeAdd(Map> map, Map> mapToAdd)
  4. merge(final List> listOfLists)
  5. merge(final List list, final String seperator)
  6. merge(final List aList, final List bList)
  7. merge(final String[] input, final String[] list)
  8. merge(List original, List merger)
  9. merge(List bs)