|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--bill.apps.wordmaker.WordMaker
This class controls the checking of the letter list for words.
| Constructor Summary | |
WordMaker()
Class creator. |
|
| Method Summary | |
void |
findWords()
Controls the finding of words in the given letters. |
Vector |
getLetters()
Retrieves the list of letters available for making words out of. |
int |
getMinimumLength()
Get the minimum length that words must be. |
int |
getWordListSize()
Determines the number of words that are contained in the word list. |
void |
init()
Clears out instance variables and resets them to an 'empty' status. |
boolean |
isValidWord(String word)
Checks if the specified word is valid. |
boolean |
isWordMakeable(String word)
Checks to see if the specified word can be spelled out using the available letters. |
void |
setFoundWordsList(JList list)
Set the list component that we show the found word list on. |
void |
setLetters(String letters)
Sets the list of letters available for making words out of. |
void |
setLetters(Vector letters)
Sets the list of letters available for making words out of. |
void |
setMinimumLength(int minLength)
Set the minimum length that words must be. |
void |
setWordList(WordList wordList)
Word list setter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WordMaker()
| Method Detail |
public void init()
public int getWordListSize()
public void setWordList(WordList wordList)
wordList - The word list to be usedpublic Vector getLetters()
public void setLetters(Vector letters)
letters - A Vector containing the letters that are available.
Note that this must contain WordMakerLetter objects.public void setLetters(String letters)
letters - A String containing the letters that are available.public int getMinimumLength()
public void setMinimumLength(int minLength)
minLength - The minimum number of characters that must be in a word.public void setFoundWordsList(JList list)
list - The list component to show the found words on.public void findWords()
public boolean isValidWord(String word)
word - The word to check the validity of.true if the word is valid, returns
false otherwise.public boolean isWordMakeable(String word)
word - The word to check for.true is returned, otherwise
false is returned.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||