wood burning stoves*
The moose likes Java in General and the fly likes Best data storage method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Best data storage method" Watch "Best data storage method" New topic
Author

Best data storage method

saddsada dsdasda
Greenhorn

Joined: Mar 20, 2006
Posts: 1
Hey, iv just got a simple problem what would be the best method for storing this type of data

list of words followed by a list of files the word is contained in e.g

"hello" ["a.txt","b.txt","c.txt"]
"ok" ["b.txt","d.txt"]
"yes" ["a.txt","b.txt"]

would i use hashset -hashmap or is it possible with arraylist

which i wish to add to this list when i find another word contained in a file so if the word is new then it gets added otherwise if i word contained in a file such as "ok" in "f.txt" it becomes

"hello" ["a.txt","b.txt","c.txt"]
"ok" ["b.txt","d.txt","f.txt"]
"yes" ["a.txt","b.txt"]



cheers in advance
Bimal Patel
Ranch Hand

Joined: Aug 29, 2003
Posts: 130
Hi,

I think HashMap is a better solution. BTW, your nickname is not proper according to JavaRanch standards .


Work Hard, Expect The Worst...<br /> <br />Bimal R. Patel<br />(SCJP 1.2, SCWCD 1.4)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Best data storage method
 
Similar Threads
Commons net Ftpclient listfiles problem
Datewise File search
Multitread synchronization
how to delete an object from heap ?
How to sort files based of creation of time,