Skip to main content

Java 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