public static class StringUtil.StringJoiner extends Object
Constructor and Description |
---|
StringJoiner(String separator)
Create a new joiner, that uses the specified separator.
|
Modifier and Type | Method and Description |
---|---|
StringUtil.StringJoiner |
add(Object stringy)
Add another item to the joiner, will be separated
|
StringUtil.StringJoiner |
append(Object stringy)
Append content to the current item; not separated
|
String |
complete()
Return the joined string, and release the builder back to the pool.
|
public StringJoiner(String separator)
complete()
or will leak a thread
local string builder.separator
- the token to insert between stringspublic StringUtil.StringJoiner add(Object stringy)
public StringUtil.StringJoiner append(Object stringy)
public String complete()
Copyright © 2009–2024 Jonathan Hedley. All rights reserved.