Example usage for Java java.util StringJoiner fields, constructors, methods, implement or subclass
The text is from its open source code.
StringJoiner(CharSequence delimiter, CharSequence prefix, CharSequence suffix) Constructs a StringJoiner with no characters in it using copies of the supplied prefix , delimiter and suffix . | |
StringJoiner(CharSequence delimiter) Constructs a StringJoiner with no characters in it, with no prefix or suffix , and a copy of the supplied delimiter . |
StringJoiner | add(CharSequence newElement) Adds a copy of the given CharSequence value as the next element of the StringJoiner value. |
StringJoiner | setEmptyValue(CharSequence emptyValue) 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. |
String | 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. |