I have a list that I created with a Wrapper Class and a Comparable/compareTo method. So it is sorted the way I would like it. From this list I created a Map with the key being the list's Created Date. I did this because I needed a table with a list of items under each Created Date. I formatted the date into a string. I now need to sort the Key in DESC order so the most recent date is on top.
To sort the keySet, once I create the the List
of keySet, how do I pull the value
from the map and match it to the List
?
keys = new List<String>(dateHeader.keySet());
keys.sort();
for(String st : keys){
//now what?
//something along the lines of:
//resortedMap.put(st, st.???);
}
my map is: Map<String, CaseInfo[]> dateHeader