The list of methods to do List Implode are organized into topic(s).
String
implode(Collection list, String separator) Implodes a collection of strings.
if (list == null) {
return "";
StringBuffer sb = new StringBuffer();
Iterator<String> i = list.iterator();
while (i.hasNext()) {
sb.append(i.next());
if (i.hasNext()) {
...
String
implode(final List pieces, final String glue) Joins a list of strings by using delimiter as glue
String out = "";
for (int i = 0; i < pieces.size(); i++) {
if (i != 0) {
out += glue;
out += pieces.get(i);
return out;
...
String
implode(List list, String deliminator) This is the inverse of 'explode'.
StringBuffer str = new StringBuffer();
Iterator iter = list.iterator();
boolean has_next = iter.hasNext();
while (has_next) {
str.append(iter.next().toString());
has_next = iter.hasNext();
if (has_next) {
str.append(deliminator);
...
String
implode(List objs, String delim) Create a string formulated by inserting a delimiter in between consecutive array elements.
StringBuilder buf = new StringBuilder();
int size = objs.size();
for (int i = 0; i < (size - 1); i++) {
buf.append(objs.get(i).toString());
buf.append(delim);
if (size != 0) {
buf.append(objs.get(size - 1).toString());
...
String
implode(List elements, String separator) Implode a list of elements into a single string, with a specified separator.
StringBuilder sb = new StringBuilder();
for (String element : elements) {
if (element.trim().length() == 0)
continue;
if (sb.length() > 0)
sb.append(separator);
sb.append(element);
return sb.toString();
String
implode(List list, String delimiter) implode
String implodedString = "";
if (list != null) {
for (String element : list) {
if (implodedString.length() > 0) {
implodedString += delimiter;
implodedString += element;
return implodedString;
String
implode(List list, String glue) implode
StringBuilder ret = new StringBuilder();
for (int i = 0; i < list.size(); i++) {
if (i != 0) {
ret.append(glue);
ret.append(list.get(i));
return ret.toString();
...
String
implode(List list, String glue) implode
String ret = "";
for (int i = 0; i < list.size(); i++) {
if (i != 0) {
ret += glue;
ret += list.get(i);
return ret;
...
String
implode(List strings, String separator) implode
StringBuffer buffer = new StringBuffer();
if (!strings.isEmpty()) {
Iterator<String> i = strings.iterator();
buffer.append(i.next());
if (i.hasNext()) {
buffer.append(separator);
return buffer.toString();
String
implode(List tokens, char separator, char escapeCharacter) implode
String escapeString = Character.toString(escapeCharacter);
String escapeString2 = escapeString + escapeString;
String separatorString = Character.toString(separator);
String separatorString2 = escapeString + separatorString;
StringBuilder builder = new StringBuilder();
boolean firstTime = true;
for (String token : tokens) {
if (firstTime) {
...