I have an HashMap :
private Map<String,Integer> matchesWonByTeam= new HashMap<String,Integer>();
- I need to order those teams by matches won (value) and return an ArrayList with the names of the teams.
- If any of those teams have the same amount of matches won they need to be alphabetically ordered.
What is the shortest and simplest way to do that using Collections and Comparators?