/** * WordGameDictionary.java * Jeff Ondich, Carleton College, 2014-01-01 * * An interface representing a string list of the sort used by word games * (e.g. Words With Friends, Boggle, etc.) to determine which strings are * legal words. * * This interface is part of an introduction to Java interfaces in * Carleton's CS 201 Data Structures course. */ public interface WordGameDictionary { /** * Add a word to this WordGameDictionary, so that future calls to hasWord * will return true for this word. If the word is already contained * in the WordGameDictionary, the word is not added. * @param word the word to add */ public void addWord(String word); /** * @return true if the specified word is in this WordGameDictionary, and * false otherwise. Comparisons are made case-insensitively. * @param word the word to look up. */ public boolean hasWord(String word); }