StreamOn this pageJava Stream Collector Collectors.collectingAndThen public static Collector<CharSequence, ?, String> joiningNoTrailingLine(String delimiter, int indentSize) { return Collectors.collectingAndThen(Collectors.joining(delimiter), s -> indentNoTrailingLine(s, indentSize));} References https://dev.java/learn/api/streams/