I work with DefaultMutableTreeNode, and it has methods depthFirstEnumeration(), breadthFirstEnumeration() and children() that return Enumeration of tree nodes.
I need to use the returned Enumeration multiple times, but I can't find any method like reset() in Enumeration. It seems like I only can get all the elements just once, and then call depthFirstEnumeration() again to get new Enumeration, it seems not to be a good solution.
Of course, I can get all the elements from Enumeration and convert it to any another reusable representation, but is there really a way to use Enumeration multiple times?