java – Depth-first iterator for JTree


I need to iterate over a JTree in a convenient, efficient way.

It’s there some library that includes a depth-first Iterator for JTrees?

I could then make our JTree extension implement Iterable, returning that Iterator, and do something like this:

for (TreeNode node : tree) {

Java 8



Source link

Related Posts

About The Author

Add Comment