-
can I dynamically name HashMaps?
Evening all.
Can you dynamically name objects? for example I would like to name a large number of HashMaps & ArrayLists of pre defined names.
Currently I'm naming then directly, but it seems inefficient.
E.g
HashMap Blue = null;
HashMap lightblue = null;
HashMap midblue = null;
HashMap darkblue = null;
and so on...
Could I save the HashMap names in a separate file (XML?) and loop through each entry to name all may HashMaps or ArrayLists?
<main>Blue</main>
<sub>lightblue</sub>
<sub>midblue</sub>
<sub>darkblue</sub>
and so on...
cheers all
-
Why not?!?
Just have a List member, when the calss starts (add a static block), load all names from porp file, and create corresponding maps. You will however have to think of a way to know what si stored where...
Sharbov.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks