Package org.jsoup.internal
Class StringUtil.StringJoiner
java.lang.Object
org.jsoup.internal.StringUtil.StringJoiner
- Enclosing class:
StringUtil
A StringJoiner allows incremental / filtered joining of a set of stringable objects.
- Since:
- 1.14.1
-
Constructor Summary
ConstructorDescriptionStringJoiner
(String separator) Create a new joiner, that uses the specified separator. -
Method Summary
Modifier and TypeMethodDescriptionAdd another item to the joiner, will be separatedAppend content to the current item; not separatedcomplete()
Return the joined string, and release the builder back to the pool.
-
Constructor Details
-
StringJoiner
Create a new joiner, that uses the specified separator. MUST callcomplete()
or will leak a thread local string builder.- Parameters:
separator
- the token to insert between strings
-
-
Method Details
-
add
Add another item to the joiner, will be separated -
append
Append content to the current item; not separated -
complete
Return the joined string, and release the builder back to the pool. This joiner cannot be reused.
-