Java Utililty Methods List Combine

List of utility methods to do List Combine

Description

The list of methods to do List Combine are organized into topic(s).

Method

Listcombine(List dest, Collection... src)
Adds all elements of the src collections to dest, returning dest.
for (Collection<T> cc : src) {
    dest.addAll(cc);
return dest;
List>combine(List list, int maxK)
combine
List<List<T>> combinations = new ArrayList<>();
for (int i = 1; i <= maxK; i++) {
    combinations.addAll(getCombinations(list, i));
return combinations;
Listcombine(List... dests)
combine
List<T> list = new ArrayList<T>();
for (List<T> dest : dests) {
    if (dest == null)
        continue;
    list.addAll(dest);
return list;
StringcombineAfterIndexWithQuotes(List commands, String match)
combine After Index With Quotes
final StringBuffer Combined = new StringBuffer("");
if (commands != null)
    for (int commandIndex = 0; commandIndex < 0; commandIndex++) {
        String s = commands.get(commandIndex);
        if (s.indexOf(' ') >= 0)
            s = "\"" + s + "\"";
        Combined.append(s + " ");
return Combined.toString().trim();
List>combineArray(List> data)
combine Array
List<List<String>> columns = new ArrayList<>();
calculation(data, columns);
List<String> column = columns.get(0);
List<List<String>> groups = new ArrayList<>();
for (int i = 0; i < column.size(); i++) {
    List<String> group = new ArrayList<String>();
    group.add(column.get(i));
    for (int j = 0 + 1; j < columns.size(); j++) {
...
ListcombineArray(List... p)
Combine a list of object lists into one list
List<T> c = new ArrayList<T>();
for (int i = 0; i < p.length; ++i) {
    for (T pl : p[i]) {
        c.add(pl);
return c;
ObjectcombineAsLists(Object one, Object two)
combine As Lists
if (one == null)
    return two;
if (two == null) {
    return one;
} else {
    List combinedList = new ArrayList();
    addAsList(combinedList, one);
    addAsList(combinedList, two);
...
voidcombineAux(List> collections, List objectAccumulator, List> resultList)
Recursive auxiliary for combine(collections).
int numCollections = collections.size();
if (numCollections == 0) {
    return;
Collection<E> firstCollection = collections.iterator().next();
boolean isEmpty = firstCollection == null || firstCollection.size() == 0;
if (numCollections == 1) {
    if (!isEmpty) {
...
float[]combineFloat(List nums)
Combines a applyTransformToDestination of int arrays in to one flat int array
int length = 0;
for (int i = 0; i < nums.size(); i++)
    length += nums.get(i).length;
float[] ret = new float[length];
int count = 0;
for (float[] i : nums) {
    for (int j = 0; j < i.length; j++) {
        ret[count++] = i[j];
...
StringcombineLines(List lines)
combine Lines
StringBuilder sb = new StringBuilder();
boolean firstLine = true;
for (String line : lines) {
    if (firstLine) {
        sb.append("\n");
        firstLine = false;
    sb.append(line);
...