|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectWordCount
A class that counts the occurrances of individual words in different input streams.
Constructor Summary | |
WordCount(DictionaryADT d)
Construct a new WordCount Object backed by a DictionaryADT d. |
Method Summary | |
void |
countWords(java.io.BufferedReader br)
Count the words from the BufferedReader and add them to the frequency count in the backing DictionaryADT. |
DictionaryADT |
getWordFrequencyDictionary()
Retrieves the word/frequency pairs as a Dictionary. |
java.util.List |
getWordFrequencyList()
Gets a list of the word/frequency pairs in the dictionary. |
static void |
main(java.lang.String[] args)
Unit test for the wordcount program |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WordCount(DictionaryADT d)
d
- The DictionaryADT that wordcount uses to count
the words.Method Detail |
public void countWords(java.io.BufferedReader br)
br
- The BufferedReader from which words will be
extracted.public java.util.List getWordFrequencyList()
public DictionaryADT getWordFrequencyDictionary()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |