public final class MultiwayTreePrinter<T> extends Object
MultiwayTreePrinter<File> printer = new MultiwayTreePrinter<>(
System.out,
File::getName,
f -> Optional.ofNullable(f.listFiles()).map(Arrays::asList).orElse(Collections.emptyList())
);
printer.print(new File("/path/dir"));
public MultiwayTreePrinter(Appendable output, Function<T,CharSequence> nodeLabel, Function<T,List<T>> nodeChildren)
public void print(T root) throws IOException
IOExceptionCopyright © 2025. All rights reserved.