String ( JTree tree, boolean withSelection, @Nullable Queryable.PrintInfo printInfo, @Nullable Condition<String> nodePrintCondition) { StringBuilder buffer = new StringBuilder(); Collection<String> strings = printAsList(tree, withSelection, printInfo, nodePrintCondition); for (String string : strings) { buffer.append(string).append("\n"); } return buffer.toString(); }