Package com.google.api.client.util
Class Joiner
- java.lang.Object
-
- com.google.api.client.util.Joiner
-
public final class Joiner extends java.lang.Object
An object which joins pieces of text (specified as an array,Iterable
, varargs or even aMap
) with a separator.NOTE: proxy for the Guava implementation of
Joiner
.- Since:
- 1.14
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.base.Joiner
wrapped
Wrapped joiner.
-
Constructor Summary
Constructors Modifier Constructor Description private
Joiner(com.google.common.base.Joiner wrapped)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
join(java.lang.Iterable<?> parts)
Returns a string containing the string representation of each ofparts
, using the previously configured separator between each.static Joiner
on(char separator)
Returns a joiner which automatically placesseparator
between consecutive elements.
-
-
-
Method Detail
-
on
public static Joiner on(char separator)
Returns a joiner which automatically placesseparator
between consecutive elements.
-
join
public final java.lang.String join(java.lang.Iterable<?> parts)
Returns a string containing the string representation of each ofparts
, using the previously configured separator between each.
-
-