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

Stringcombine(final List r, final char sep)
Combine elements from a list using separator.
StringBuilder buf = new StringBuilder(r.get(0).toString());
for (int i = 1; i < r.size(); i++) {
    buf.append(sep);
    buf.append(r.get(i));
return buf.toString();
byte[]combine(final List dataChunks)
Combines a list of byte arrays into one big byte array.
int totalSize = 0;
for (final byte[] dataPart : dataChunks) {
    totalSize += dataPart.length;
final byte[] data = new byte[totalSize];
int index = 0;
for (final byte[] dataPart : dataChunks) {
    System.arraycopy(dataPart, 0, data, index, dataPart.length);
...
Listcombine(final List list, final List list2)
combine
final List<T> combinedList = new ArrayList<T>();
combinedList.addAll(list);
combinedList.addAll(list2);
return combinedList;
Listcombine(int sign, List exponentBits, List mantissaBits)
combine
List<Integer> bits = new ArrayList<>();
bits.add(sign);
bits.addAll(exponentBits);
bits.addAll(mantissaBits);
return bits;
Stringcombine(List r, char sep)
combine
StringBuilder buf = new StringBuilder(r.get(0).toString());
for (int i = 1; i < r.size(); i++) {
    buf.append(sep);
    buf.append(r.get(i));
return buf.toString();
Listcombine(List> lists)
Combines a bunch of lists inside of a large list.
List<T> majorList = new ArrayList<T>();
lists.forEach(majorList::addAll);
return majorList;
Stringcombine(List commands, int startAt, int endAt)
combine
final StringBuffer Combined = new StringBuffer("");
if (commands != null)
    for (int commandIndex = startAt; commandIndex < endAt; commandIndex++)
        Combined.append(commands.get(commandIndex) + " ");
return Combined.toString().trim();
Stringcombine(List strlist, String delimiter)
combine
StringBuilder buf = new StringBuilder();
if (strlist.isEmpty() == false) {
    for (int i = 0; i < strlist.size(); i++) {
        String elem = strlist.get(i);
        buf.append(elem);
        if (i != strlist.size() - 1)
            buf.append(delimiter);
return buf.toString();
Stringcombine(List tokens, String separator)
combine
StringBuffer sb = new StringBuffer();
boolean isFirst = true;
for (String token : tokens) {
    if (isFirst)
        isFirst = false;
    else
        sb.append(separator);
    sb.append(token);
...
Listcombine(List a, List b)
combine
List<T> list = new ArrayList<T>();
for (T t : a)
    list.add(t);
for (T t : b)
    list.add(t);
return list;