public static String [ ] toSortedArray ( Set < String > groups ) { //TODO: sort in another way than just alphabetically String [ ] sortedArray = groups . toArray ( new String [ groups . size ( ) ] ) ; Arrays . sort ( sortedArray ) ; return sortedArray ; }
Alphabetically sort the list of groups