|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An aspect of the Model. This inferface provides the methods neccessary to
manipulate the dictionary data and word history data. The interface could
be implemented by the same concrete class that implements IBoggleView,
or it could be a separate class. For use with the 143 Mix Matcher, a separate class
would have to be inside the same compilation unit, i.e., .java file, as
the main View class.
Method Summary | |
void |
addToDictionary(String[] words)
let the user add new words to dictionary |
void |
addToHistory(String acceptedProposal)
add the accepted proposal to the history |
void |
emptyHistory()
empty the history list |
List |
getHistory()
get a history of all accepted words |
int |
getHistoryLength()
get the length of history |
boolean |
isValidPosition(int row,
int col)
determine if the selected letter is permetted by geometrical constraints |
String |
isValidWord(String proposal)
determine if the word proposed is valid or not. |
Set |
loadDictionary(URL url)
Load a dictionary from a resource (file) specified by url. |
void |
saveDictionary(URL url)
to save the dictionary to the place specified by url |
void |
setDictionary(Set dict)
set the dictionary to be a given List. |
Method Detail |
public Set loadDictionary(URL url)
url
- the place to load the resource from.
public void setDictionary(Set dict)
dict
- set the dictionary externally.public void addToDictionary(String[] words)
words
- an array of strings to store in dictionarypublic void saveDictionary(URL url)
url
- the place to store the dictionarypublic boolean isValidPosition(int row, int col)
row
- specify the row of the letter selectedcol
- specify the column of the letter selected
public String isValidWord(String proposal)
proposal
- a String contains the word just been selected from gui
public List getHistory()
public int getHistoryLength()
public void emptyHistory()
public void addToHistory(String acceptedProposal)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |