class OAuthAuthorityUtils {

    public static final Set<String> csvToSet(String csv, String delimiter) {
        if (csv == null || csv.isEmpty()) {
            return null;
        }
        Set<String> set = new HashSet<String>();
        if (delimiter == null || delimiter.isEmpty()) {
            set.add(csv);
        } else {
            Collections.addAll(set, csv.split(delimiter));
        }
        return set;
    }

    private  OAuthAuthorityUtils();

}