public class WordListDictionary extends Object implements Dictionary
String
.Modifier and Type | Field and Description |
---|---|
protected WordList |
wordList
list used for searching.
|
Constructor and Description |
---|
WordListDictionary(WordList wl)
Creates a new dictionary instance from the supplied
WordList . |
Modifier and Type | Method and Description |
---|---|
WordList |
getWordList()
Returns the word list used for searching.
|
static void |
main(String[] args)
Provides command line access to this word list dictionary.
|
boolean |
search(String word)
Returns whether the supplied word exists in the dictionary.
|
long |
size()
Returns the number of words in this dictionary
|
String |
toString() |
protected final WordList wordList
public WordListDictionary(WordList wl)
WordList
.wl
- list of words sorted according to WordList.getComparator()
.
NOTE Failure to provide a sorted word list will produce incorrect results.
public WordList getWordList()
public long size()
Dictionary
size
in interface Dictionary
public boolean search(String word)
Dictionary
search
in interface Dictionary
word
- to search forCopyright © 2003-2024 Virginia Tech. All Rights Reserved.