public static Set<String> splitDelimitedString(String string,String delimiter){
  Set<String> splitString=new HashSet<>();
  StringTokenizer stringTokenizer=new StringTokenizer(string,delimiter);
  while (stringTokenizer.hasMoreTokens()) {
    splitString.add(stringTokenizer.nextToken());
  }
  return splitString;
}

public static Set < String > splitDelimitedString ( String string , String delimiter ) { Set < String > splitString = new HashSet < > ( ) ; StringTokenizer stringTokenizer = new StringTokenizer ( string , delimiter ) ; while ( stringTokenizer . hasMoreTokens ( ) ) { splitString . add ( stringTokenizer . nextToken ( ) ) ; } return splitString ; }
splits a delimited string into a set of strings .
