-
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
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|