• Constructor Summary

    Constructors

    Constructs a StringJoiner with no characters in it, with no prefix or suffix, and a copy of the supplied delimiter.

    Constructs a StringJoiner with no characters in it using copies of the supplied prefix, delimiter and suffix.

  • Method Summary

    Adds a copy of the given CharSequence value as the next element of the StringJoiner value.

    int

    length()

    Returns the length of the String representation of this StringJoiner.

    Adds the contents of the given StringJoiner without prefix and suffix as the next element if it is non-empty.

    Sets the sequence of characters to be used when determining the string representation of this StringJoiner and no elements have been added yet, that is, when it is empty.

    toString()

    Returns the current value, consisting of the prefix, the values added so far separated by the delimiter, and the suffix, unless no elements have been added in which case, the prefix + suffix or the emptyValue characters are returned.

    Methods declared in class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Creates and returns a copy of this object.

    boolean

    Indicates whether some other object is "equal to" this one.

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    int

    Returns a hash code value for this object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • Constructor Details

    • StringJoiner

    • StringJoiner

  • Method Details

    • setEmptyValue

    • toString

    • add

    • merge

    • length