I'm looking to sort an arraylist of strings to make them so all the mondays are at the start of the list and all the fridays are at the end. For example,
days.add("Thursday");
days.add("Monday");
days.add("Friday");
days.add("Wednesday");
days.add("Thursday");
days.add("Thursday");
I would like this to be outputted as follows;
"Monday"
"Wednesday"
"Thursday"
"Thursday"
"Thursday"
"Friday"
I am doing this as I need to graph the results and I'd prefer if the graph was in this order. I was thinking maybe using a mapping to put Monday, 1 : Tuesday, 2 etc and compare that way but I don't know if there is a simpler way. Any help is greatly appreciated Thanks!