/** * Specification for a Lexicon as used in the Boggle * assignment. Lexicons can be loaded from a scanner or an * ArrayList, searched for a string to see if the string is a WORD, the * PREFIX of a word, or is NOT_WORD (see LexStatus). *
* Words can be queried by using either a StringBuilder or a String.
* Implementations may convert one to another so that there's no
* guarantee that the wordStatus method doesn't create
* a new object in performing a lexicon query.
*
*
* @author Owen Astrachan
*
*/
import java.util.*;
public interface ILexicon extends IterablewordStatus that takes a
* StringBuilder parameter, but works with a String.
* @param s is the string queried
* @return status of s as to how it appears in lexicon
*/
public LexStatus wordStatus(String s);
/**
* Return an iterator over all words stored
* in the lexicon.
* @return an iterator over the words in the lexicon
*/
public Iterator