Class Joiner (1.41.8)

public final class Joiner

An object which joins pieces of text (specified as an array, Iterable, varargs or even a Map) with a separator.

NOTE: proxy for the Guava implementation of com.google.common.base.Joiner.

Inheritance

java.lang.Object > Joiner

Static Methods

on(char separator)

public static Joiner on(char separator)

Returns a joiner which automatically places separator between consecutive elements.

Parameter
NameDescription
separatorchar
Returns
TypeDescription
Joiner

Methods

join(Iterable<?> parts)

public final String join(Iterable<?> parts)

Returns a string containing the string representation of each of parts, using the previously configured separator between each.

Parameter
NameDescription
partsIterable<?>
Returns
TypeDescription
String