Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7899383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:41:16+00:00 2026-06-03T08:41:16+00:00

I work with DefaultMutableTreeNode , and it has methods depthFirstEnumeration() , breadthFirstEnumeration() and children()

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:41:17+00:00Added an answer on June 3, 2026 at 8:41 am

    No that is not possible with Enumeration. On this subject, java doc says:

    An object that implements the Enumeration interface generates a series
    of elements, one at a time.

    Notice the one at a time which means that if you want to manipulate the Enumeration as a list then you will have to convert it.
    You can create a List when you first request the Enumeration. This way you could use and manipulate it however you wish.

    Enumeration e = ...
    ArrayList aList = Collections.list(e);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I work in a place that has gazillions of tools which require tons of
My work has a policy (in a different department) that reads roughly as follows:
We work with a group of contractors that need access to our TFS 2010
I work in a group that does a large mix of research development and
I work on a project with 4 other devs. We currently use Visual Studio
I work with a client that is using purchase orders, and a custom order's
I work on an ASP.Net project which we build with VS 2010. We use
I work directly on a remote (S)FTP Server some times. I use textmate as
I work with a android device which use a WCF web service. I managed
I have a JTree and the Nodes are a abstract class (Item) that extends

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.