Java Utililty Methods List Implode

List of utility methods to do List Implode

Description

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

Method

Stringimplode(String glue, List list)
Joins a list of items to a single string using "glue" as separator If the item is null, it will add as empty
if (list == null || list.isEmpty()) {
    return "";
StringBuilder sb = new StringBuilder();
boolean addGlue = false;
for (T item : list) {
    if (addGlue) {
        sb.append(glue);
...
Stringimplode(String split, List list)
implode
return implode(split, list, "", "");
StringimplodeList(final List list, final String glue)
Implode a list of values (Like php's implode)
final StringBuilder builder = new StringBuilder();
for (final Iterator<?> it = list.iterator(); it.hasNext();) {
    builder.append(it.next());
    if (it.hasNext()) {
        builder.append(glue);
return builder.toString();
...