Java List Concatenate concatTwoList(List fromList, List toList)

Here you can find the source of concatTwoList(List fromList, List toList)

Description

concat Two List

License

Apache License

Declaration

public static void concatTwoList(List fromList, List toList) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.List;

public class Main {

    public static void concatTwoList(List fromList, List toList) {
        if (fromList == null || toList == null)
            return;
        for (int i = 0; i < fromList.size(); i++) {
            Object obj = fromList.get(i);
            if (!toList.contains(obj))
                toList.add(obj);/* w w  w.j a  v a 2  s.co m*/
        }
    }
}

Related

  1. concatRefs(List refs)
  2. concatString(List args)
  3. concatStrings(List values, String separator)
  4. concatSuper(List collection1, List collection2)
  5. concatSynopsises( List prefixes, List ss)
  6. concatValues(List stringValues, boolean spaceSeparated)
  7. concatWithSeparator(List list, Object delimiter)
  8. concatWithSeparator(List missingParameters, String separator)
  9. getConcatenatedStringFromList(List input, String delimiter)