|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--bill.apps.wordsearch.WordSearch
This class controls the checking of the letter list for words.
| Constructor Summary | |
WordSearch()
Class creator. |
|
| Method Summary | |
String |
findWord(int numWords)
Controls the finding of words in the given letters. |
Vector |
getLetters()
Retrieves the list of letters available for making words out of. |
String |
getWordFile()
Word list file name getter. |
Vector |
getWordLengths()
get the list of word lengths for the words we are trying to create. |
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 |
initializeLengthsFromSysIn()
Gets the list of word lengths from the user using System.in. |
boolean |
initializeLettersFromSysIn()
Gets the letters that are available to create our word(s) from. |
boolean |
isValidWord(String word)
Checks if the specified word is valid. |
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 |
setWordLengths(Vector lengths)
Set the list of word lengths for the words we are trying to create. |
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 WordSearch()
| Method Detail |
public void init()
public int getWordListSize()
public void setWordList(WordList wordList)
wordList - The word list to be usedpublic String getWordFile()
public Vector getWordLengths()
public void setWordLengths(Vector lengths)
lengths - The Vector of word lengths.public boolean isValidWord(String word)
word - The word to check the validity of.true if the word is valid, returns
false otherwise.public Vector getLetters()
public void setLetters(Vector letters)
letters - A Vector containing the letters that are available.
Note that this must contain WordSearchLetter objects.public void setLetters(String letters)
letters - A String containing the letters that are available.public boolean initializeLengthsFromSysIn()
true if the lengths are read successfully,
false otherwise.public boolean initializeLettersFromSysIn()
true if the letters are read successfully,
false otherwise.public String findWord(int numWords)
numWords - The number of words we still need to find in the list
of letters.null if no words were
found.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||