|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Dictionary
Model a dictionary with a TreeMap of (word, Definition) pairs.
Definition
Constructor Summary | |
Dictionary()
Construct an empty Dictionary. |
Method Summary | |
void |
addEntry(String word,
Definition definition)
Add an entry to this Dictionary. |
Definition |
getEntry(String word)
Look up an entry in this Dictionary. |
int |
getSize()
Get the size of this Dictionary. |
String |
toString()
Construct a String representation of this Dictionary. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Dictionary()
Method Detail |
public void addEntry(String word, Definition definition)
word
- the word being defined.definition
- the Definition of that word.public Definition getEntry(String word)
word
- the word whose definition is sought
public int getSize()
public String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |