TreeMaps are held sorted by key, so if you want to see the values sorted in some other order you need to get the values as a simple collection teams.values() and then use Collections.sort to sort it using a custom comparator that compares raceTeams by their names.