List of utility methods to do List Concatenate
String | concatNodeList(List concat Node List StringBuilder result = new StringBuilder(); result.append("Total List Count: " + list.size() + "\n\n"); for (String item : list) { result.append(item).append("\n"); return result.toString(); |
String | concatPathTokens(String root, List concat Path Tokens String[] array = new String[tokens.size() + 1]; array[0] = root; int i = 1; for (String token : tokens) { array[i++] = token; return concatPathTokens(array); |
String | concatRefs(List concat Refs return concat(refs, ' '); |
String | concatString(List concat String StringBuilder buf = new StringBuilder(); for (String arg : args) { if (buf.length() > 0) buf.append(' '); buf.append(arg); return buf.toString(); |
String | concatStrings(List Returns concatenated string. StringBuffer concatedValues = new StringBuffer(); Iterator<String> valuesIter = values.iterator(); if (valuesIter.hasNext()) { concatedValues.append(valuesIter.next()); while (valuesIter.hasNext()) { concatedValues.append(separator); concatedValues.append(valuesIter.next()); return concatedValues.toString(); |
List extends T> | concatSuper(List extends T> collection1, List extends T> collection2) concat Super if (isEmpty(collection1)) { return collection2; if (isEmpty(collection2)) { return collection1; List<T> result = createArrayList(collection1.size() + collection2.size()); result.addAll(collection1); ... |
List | concatSynopsises(List concat Synopsises List<StringBuilder> newList = new ArrayList<StringBuilder>(); if (prefixes.size() == 0) return ss; for (StringBuilder prefix : prefixes) { for (StringBuilder s : ss) { newList.add( new StringBuilder(prefix.length() + s.length() + 1).append(prefix).append(" ").append(s)); return newList; |
void | concatTwoList(List fromList, List toList) concat Two List 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); |
String | concatValues(List concat Values StringBuilder builder = new StringBuilder(); String separator = spaceSeparated ? " " : ", "; for (int x = 0; x < stringValues.size(); ++x) { builder.append(stringValues.get(x)); if (x != stringValues.size() - 1) { builder.append(separator); return builder.toString(); |
String | concatWithSeparator(List> list, Object delimiter) Concats a list of objects together using delimiter. StringBuffer buf; buf = new StringBuffer(); for (Object i : list) { if (i != null) { if (buf.length() > 0) buf.append(delimiter); buf.append(i.toString().trim()); return buf.toString(); |