Is there an Android utility for storing a static map?
<p>I've got a common use-case wherein a user selects one item out of many (say, on a spinner or autocomplete list), then enters the data.  For example, let's say the user selects a country.  Ultimately, the data I want is the country code, not the country name; but the users will want to select based on name, not code.  To put it another way, user's will select "United States", but I ultimately want that to translate into "US".</p>

<p>There are a lot of countries.  Is there an easy way to setup a mapping in Android to hash from the name to the code?  I've thought of a few solutions, none of them are quite satisfactory in my mind:</p>

<ol>
<li><p>A database containing country/code, which I can query on.</p></li>
<li><p>Setting up all countries as strings in <code>strings.xml</code>, then retrieving the resource by name.</p></li>
<li><p>Creating a huge Map in code and using that.  (This is the least satisfactory answer).</p></li>
</ol>

<p>Anyone have any cleverer solutions?</p>
