Class AppendableJoiner.Builder<T>

  • Type Parameters:
    T - the type of elements to join.
    All Implemented Interfaces:
    java.util.function.Supplier<AppendableJoiner<T>>
    Enclosing class:
    AppendableJoiner<T>

    public static final class AppendableJoiner.Builder<T>
    extends java.lang.Object
    implements java.util.function.Supplier<AppendableJoiner<T>>
    Builds instances of AppendableJoiner.
    • Method Detail

      • setDelimiter

        public AppendableJoiner.Builder<T> setDelimiter​(java.lang.CharSequence delimiter)
        Sets the delimiter that separates each element.
        Parameters:
        delimiter - The delimiter that separates each element.
        Returns:
        this instance.
      • setElementAppender

        public AppendableJoiner.Builder<T> setElementAppender​(FailableBiConsumer<java.lang.Appendable,​T,​java.io.IOException> appender)
        Sets the consumer used to render each element of type T onto an Appendable.
        Parameters:
        appender - The consumer used to render each element of type T onto an Appendable.
        Returns:
        this instance.
      • setPrefix

        public AppendableJoiner.Builder<T> setPrefix​(java.lang.CharSequence prefix)
        Sets the sequence of characters to be used at the beginning.
        Parameters:
        prefix - The sequence of characters to be used at the beginning.
        Returns:
        this instance.
      • setSuffix

        public AppendableJoiner.Builder<T> setSuffix​(java.lang.CharSequence suffix)
        Sets the sequence of characters to be used at the end.
        Parameters:
        suffix - The sequence of characters to be used at the end.
        Returns:
        this instance.