Class Joiner



  • public final class Joiner
    extends Object
    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.

    Since:
    1.14
    • Method Summary

      Modifier and Type Method and Description
      String join(Iterable<?> parts)
      Returns a string containing the string representation of each of parts, using the previously configured separator between each.
      static Joiner on(char separator)
      Returns a joiner which automatically places separator between consecutive elements.
    • Method Detail

      • on

        public static Joiner on(char separator)
        Returns a joiner which automatically places separator between consecutive elements.
      • join

        public final String join(Iterable<?> parts)
        Returns a string containing the string representation of each of parts, using the previously configured separator between each.