com.swabunga.spell.event

Class DefaultWordFinder

public class DefaultWordFinder extends AbstractWordFinder

A basic word finder, which searches text for sequences of letters.

Author: Anthony Roy (ajr@antroy.co.uk)

Constructor Summary
DefaultWordFinder(String inText)
Creates a new DefaultWordFinder object.
DefaultWordFinder()
Creates a new DefaultWordFinder object.
Method Summary
Wordnext()
This method scans the text from the end of the last word, and returns a new Word object corresponding to the next word.

Constructor Detail

DefaultWordFinder

public DefaultWordFinder(String inText)
Creates a new DefaultWordFinder object.

Parameters: inText the String to search

DefaultWordFinder

public DefaultWordFinder()
Creates a new DefaultWordFinder object.

Method Detail

next

public Word next()
This method scans the text from the end of the last word, and returns a new Word object corresponding to the next word.

Returns: the next word.

Throws: WordNotFoundException search string contains no more words.