salesforce - How to convert SET to array in APEX? -


i have map key , value , goal list of 'key'. thinking array or list. got point have key values in set haven't figure out how convert array.

below code:

map<string, string> mmm = new map<string, string>(); mmm.put('one', 'oneee'); mmm.put('two', 'twooo'); mmm.put('three', 'threeee'); mmm.put('four', 'fourff');  //outputs values in map system.debug('=======values()==========>' + mmm.values()); //outputs key in map system.debug('=======keyset()===========>' + mmm.keyset());  //get keys in type set set<string> s = mmm.keyset(); //returns 4 system.debug('------------------------------------' + s.size());  s.arrayto() //this method not exist :( 

use list.addall method?

http://www.salesforce.com/us/developer/docs/apexcode/index_left.htm#starttopic=content/apex_methods_system_list.htm?searchtype=stem

if not - manually loop through set...


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -