Package com.github.javaparser.utils
Class SeparatedItemStringBuilder
java.lang.Object
com.github.javaparser.utils.SeparatedItemStringBuilder
Builds a string containing a list of items with a prefix, a postfix, and a separator.
Example: (1,2,3) which has prefix "(", separator ",", postfix ")" and the items 1 through 3.
Example: (1,2,3) which has prefix "(", separator ",", postfix ")" and the items 1 through 3.
Java 8 offers the very nice Collectors.joining(String, String, String) which does the same thing.
-
Constructor Summary
ConstructorsConstructorDescriptionSeparatedItemStringBuilder(String prefix, String separator, String postfix)
-
Method Summary
Modifier and TypeMethodDescriptionappend(CharSequence format, Object... args)
Add one item.boolean
hasItems()
toString()
Convert the builder into its final string representation.
-
Constructor Details
-
SeparatedItemStringBuilder
-
-
Method Details