Java Utililty Methods List Concatenate

List of utility methods to do List Concatenate

Description

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

Method

StringconcatWithSeparator(List missingParameters, String separator)
concat With Separator
assert missingParameters != null;
assert separator != null;
if (missingParameters.isEmpty()) {
    return "";
StringBuilder result = new StringBuilder();
for (int i = 0; i < missingParameters.size() - 1; i++) {
    result.append(missingParameters.get(i));
...
StringgetConcatenatedStringFromList(List input, String delimiter)
get Concatenated String From List
StringBuffer concatenatedString = new StringBuffer();
for (String data : input) {
    concatenatedString.append(data);
    concatenatedString.append(delimiter);
return concatenatedString.toString();
StringgetConcatenateString(List codes)
get Concatenate String
StringBuilder concatStr = new StringBuilder();
for (String code : codes) {
    concatStr.append("'" + code + "'" + ",");
return concatStr.toString().replaceAll(",$", "");
StringgetConcatinatedRange(List numbers)
get Concatinated Range
StringBuilder sb = new StringBuilder();
if (numbers.size() == 0) {
    return sb.toString();
Number prev = null;
Number current = null;
for (int i = 0; i < numbers.size(); i++) {
    current = numbers.get(i);
...
StringgetZipAndConcatenated(List input1, List input2, String delimiter)
get Zip And Concatenated
StringBuffer concatenatedString = new StringBuffer();
for (int i = 0; i < input1.size(); i++) {
    concatenatedString.append(input1.get(i));
    concatenatedString.append("='");
    if (i < input2.size()) {
        concatenatedString.append(input2.get(i));
    concatenatedString.append("'");
...
StringlistToConcatenatedString(List stringList, String delimiter)
list To Concatenated String
StringBuffer sb = new StringBuffer();
for (String str : stringList) {
    if (str.contains(delimiter)) {
        throw new IllegalArgumentException(
                "Source name '" + str + "' contains DELIMITER '" + delimiter + "'");
    if (sb.length() == 0) {
        sb.append(str);
...
StringtoString(List _toString, String _concator)
Wandelt eine Liste in Liste von Strings um
StringBuffer sb = new StringBuffer();
for (int i = 0, m = _toString.size(); i < m; i++) {
    sb.append(_toString.get(i));
    if ((i + 1) != m) {
        sb.append(_concator);
return sb.toString();
...