question: public static Set < String > commaDelimitedListToSet ( String str ) { Set < String > set = new TreeSet < > ( ) ; String [ ] tokens = commaDelimitedListToStringArray ( str ) ; set . addAll ( Arrays . asList ( tokens ) ) ; return set ; }
target:  Convenience method to convert a CSV string list to a set. Note that this will suppress duplicates.