/** * Returns searches for the next word in the text, and returns that word. * * @return the string representing the current word. * @throws WordNotFoundException search string contains no more words. */ public String nextWord() { currentWord = finder.next(); return currentWord.getText(); }