title: Convert HashMap.keySet() to CharSequence[]?
body: <p>I have a method in a client class that gathers data from a server, and returns a HashMap. I want to list the keys in an android dialog. The android API requires that the data must be in in the form of a CharSequence[]. So far as I can tell, there is no direct way to convert these data types. What would be the best way to accomplish this?</p>
  
  <p>Here is the declaration and initialization of the hashmap and keyset:</p>
  
  <pre><code>Map &lt;String, String&gt; players = client.listPlayers();
  Set&lt;String&gt; player_names = players.keySet();
  </code></pre>
  
  <p><a href="http://developer.android.com/guide/topics/ui/dialogs.html" rel="nofollow">And here is the link to the android Dialog documentation.</a></p>
  
  <p><strong>Note:</strong> CharSequence, which is able to be casted from a Set is not the same as CharSequence[]</p>
  
  <p>Any help is appreciated.</p>
  
  <p>-Sean W.</p>