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 8069369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:59:58+00:00 2026-06-05T12:59:58+00:00

i am doing programming in GWT i have class FolderColection and Folder, in FolderColection

  • 0

i am doing programming in GWT

i have class FolderColection and Folder,
in FolderColection Class there is Hashmap hm

public class folderCollection{

  public Map<String,Folder>FolderCollection = new HashMap<String,Folder>();

  public void addFolder(Folder folder){
    String folderKey = folder.getKey();
    FolderCollection.put(folderKey, folder);
  }
}

In Folder class

public Class Folder{
  // Not a complete code , but an idea of a code 
  String name;
  String dateOfcreation;

  private FolderCollection  folderCollection = new FolderCollection();
  // Folder can also have many sub folders
  //More variables
  // all get set methods 
}

Now for example : all are folders

 1.A
    1.Aa
      1.Aa1
      2.Aa2
    2.Ab
 2.B
    1.Ba
    2.Bb
 3.C

A, B , C Folders are in FolderCollection.
As A is also a folder and it contains FolderCollection (Folder Aa , Folder Ab).
Similarly Folder Aa has FolderCollection of (Folder Aa1, Folder Aa2).

I able to make this which i have explained above.

I have difficulty in Accesing the object for example object of Folder Aa1.
Suppose I want to change the name of Folder Aa2, for that i have to iterate till that object.

Please Help me to solve this.

i have path as all the folder names are added in tree widget accordint to the parentsTreeItem.

ex: if i have to change name of Aa2 then
I have

 String [] path ={A,Aa,Aa2};

Some Help me with this will be of great Help.

  • 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-05T12:59:59+00:00Added an answer on June 5, 2026 at 12:59 pm

    If you have the path you don’t have to iterate through the hashmap, just get the value for each path element from the respective folder collection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm in an introductory comp-sci class (after doing web programming for years) and became
I'm fairly new to VB.NET, and I've mainly been doing ASP programming up 'til
I am doing some C programming for school and I have found myself reusing
I have been doing web programming for several years now and since then I
I have been doing Windows programming in .Net since last two years. Now I
Anyone got any experience of teams doing pair programming where there is a mixed
Is there any tutorial about using debuggers, when doing C programming on Linux (console
I'm fairly new to iOS programming, but have a basic understanding of it. I
I have been doing socket programming for many years, but I have never had
I have been doing python programming for my project and I have just started.

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.