|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
interface Dictionary
This is the interface which every possible dictionary should implement to work with cornucopia. This implementation is based on the strategy design pattern. By using this pattern we are able to contain the possiblily changing component in one class preventing any ripple effect in rest of the application.
Follwoing is the sequence in which a dictionary's methods will be called.
The above said protocol does not depend at which stage is actually the meaning is fetched from the database. It can either be in read or getMeaning method, All that is required is that they must returns correct values.
Method Summary | |
---|---|
boolean |
findWord(java.lang.String word)
This function performs the initialisation required for the "read" and "getMeaning" functions to work properly. |
java.lang.String |
getDescription()
The description returned by this function is used by cornucopia at the time of startup to display which dictionary is currently loaded. |
java.lang.String |
getMeaning()
This method gives the next meaning string, as signaled by "read" method. |
boolean |
read()
This function signals weather another meaning corresponding to the word set by "findWord" function. |
Method Detail |
---|
boolean findWord(java.lang.String word)
boolean read()
java.lang.String getMeaning()
java.lang.String getDescription()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |