code: private void advance() {
  	String s = null;
  	while (tokenizer.hasNext()) {
  	    String nextToken = tokenizer.next();
  	    // stop if the word should be returned
  	    if (filter.accept(nextToken)) {
  		s = nextToken;
  		break;
  	    }
  	}
  	next = s;
      }
docs: Advances to the next word in the token stream.