I have a large number of strings used in my Android application that are broken down into three categories: 1 word strings, 2 word strings, 3 word strings. I need to be able to search through these three lists of strings quickly looking for matches to a given key and returning a third value associated to these strings.
For instance if I'm looking for the key "New York"
and my list is:
New York, test1
New Jersey, test2
Colorado, test3
Arkansas, test4
New York, test5
A search would return the strings: test1 and test5
What is the best way to store these strings that searching for matches is fastest on an android phone?
The options I thought of so far were: database, xml, csv. Are there any other options and what would be the best choice for this situation?
Edit: What if I wanted to preserve an order of the items so they could be moved up or down on the list, i know Hashmap is un-ordered. Would an arraylist work?