You need to sign in to do that
Don't have an account?
Related to Map
Hi I want to get the positions based on candidate profile so i prepared an algorith using maps
i have used
Map<String, Map<Integer,Map<String, String>>>
key is like catogery like MBA-Finance, MBA-HR
Integer is Years of Experience
Innermost map is mapping between Candidate Education qualification and Position functional area.
now my question is if i form a map it will look like below.
Map<String, Map<Integer, Map<String, String>>> qualification = new Map<String, Map<Integer, Map<String, String>>>();
qualification.put('MBA-Finance', new Map<Integer, Map<String, String>>
{0=>new Map<String, String>{'MBA - Finance'=>'Finance'},
1=>new Map<String, String>{'MBA - Finance'=>'Finance'}});
qualification.put('MBA-HR', new Map<Integer, Map<String, String>>
{0=>new Map<String, String>{'MBA - Human Resources'=>'Human Resources'},
1=>new Map<String, String>{'MBA - Human Resources'=>'Human Resources'}});
here i'm repeating the inner most map
Is there any efficent way which i can do this???
Here's some code that demonstrates how to create a map of maps:
http://www.salesforcefast.com/2012/09/automatically-add-contact-roles-when.html
You should be able to extend that to create a map of map of maps. The general approach is that you have three lists of values, and iterate over these lists to construct your map(s).
Good luck!