public static void forEachToken(String string,String separator,Procedure<String> procedure){
  for (StringTokenizer stringTokenizer=new StringTokenizer(string,separator); stringTokenizer.hasMoreTokens(); ) {
    String token=stringTokenizer.nextToken();
    procedure.value(token);
  }
}

public static void forEachToken ( String string , String separator , Procedure < String > procedure ) { for ( StringTokenizer stringTokenizer = new StringTokenizer ( string , separator ) ; stringTokenizer . hasMoreTokens ( ) ; ) { String token = stringTokenizer . nextToken ( ) ; procedure . value ( token ) ; } }
for each token in a string separated by the specified separator , execute the specified stringprocedure by calling the valueofstring method .
