How to convert a SET back to a HASHMAP for display in customAdapter
<p>I am really stuck with this problem and would appreciate some help. </p>

<p>Firstly, I have a service running which contains a simple hashmap </p>

<p>ORIG_MSG_MAP is a hashmap with Integer,String key value pairs. The service has a method to return the contents of the hashmap as a set</p>

<pre><code>//get entries in the hash 
public Set&lt;Entry&lt;String, Integer&gt;&gt; getNumbers() {
    // TODO Auto-generated method stub

    return ORIG_MSG_MAP.entrySet();


}
</code></pre>

<p>in my activity I am interacting with the service and then I call my constructor in customAdapter which needs to work with a hashmap not a SET</p>

<p>ACTIVITY</p>

<pre><code>      /** Defines callbacks for service binding, passed to bindService() */
private ServiceConnection mConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName className, IBinder service) {
// We've bound to LocalService, cast the IBinder and get LocalService instance
LocalBinder binder = (LocalBinder) service;
mService = binder.getService();
mBound = true;
Set&lt;Entry&lt;String, Integer&gt;&gt; whatsup = mService.getNumbers();
</code></pre>

<p>----> The question marks should be a reference to a hash with key,value pairs &lt;---- 
    setListAdapter(new MyCustomAdapter(DynamicLists.this, R.layout.row, ???));</p>

<p>Constuctor for MyCustomAdapter he expects a hash</p>

<pre><code>public MyCustomAdapter(DynamicLists dynamicLists, int row, HashMap&lt;String, Integer&gt; map){ 
mData = map;
mKeys = mData.keySet().toArray(new String[map.size()]);
Log.d(TAG, "INSIDE ADAPTER constructor HELLO WORLD " + map.entrySet()); 
</code></pre>

<p>}</p>

<p>Can you please help me convert a set back to a hash </p>

<p>Thanks,</p>

<p>Graham </p>
