aspose file tools*
The moose likes Beginning Java and the fly likes Which one  best replaces HashMap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Which one  best replaces HashMap" Watch "Which one  best replaces HashMap" New topic
Author

Which one best replaces HashMap

Arjun Karthick
Ranch Hand

Joined: Jan 04, 2007
Posts: 77
Hi all,
I was using HashMap to store the configuration details as name/value pair.This causes lot of objects to be created at runtime as there are lot of name/value pair under different section in the configuration in which each section requires a new hashmap.

Is there any alternative way to store the name/value pair of configuration in a more efficient manner.How good does properties file suit this requirement.
Please suggest me in this.
Regards,
Arjun.
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
Hi Arjun,

Are you talking about Properties class of "java.uti.Properties"?
Give little more detail what configuration you put in the HashMap and find Properties a suitable sunbstitute of HashMap.



Thanks and Regards,
cmbhatt


cmbhatt
Arjun Karthick
Ranch Hand

Joined: Jan 04, 2007
Posts: 77
Hi
yes i mean java.util.properties.
My HashMap will look like this


Does this can be handled using properties file?

thanks,
Arjun.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Which one best replaces HashMap