|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--kwic.KWIC
Key Word in Context
| Field Summary | |
protected HashMap |
map
|
protected PropertyChangeSupport |
pcs
|
| Constructor Summary | |
KWIC()
|
|
| Method Summary | |
void |
addPhrase(kwic.Phrase p)
For each Word in the Phrase, add the Word
to the association. |
void |
addPhrase(String s)
Convenient interface |
void |
deletePhrase(kwic.Phrase p)
For each word in the Phrase, delete the association between
the word and the phrase. |
void |
deleteWord(kwic.Word w)
Drop a word completely from the KWIC |
void |
dropAssoc(kwic.Word w,
kwic.Phrase p)
Drop the association between the specified Word and Phrase, if any |
void |
forceAssoc(kwic.Word w,
kwic.Phrase p)
Force a mapping between the speicified Word and Phrase |
PropertyChangeSupport |
getPCS()
Required for part (b) of this lab. |
Iterator |
getPhrases(kwic.Word w)
Return an Iterator that provides each Phrase associated with
the specified Word. |
Iterator |
getWords()
Rerturn an iterator of all words |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected PropertyChangeSupport pcs
protected HashMap map
| Constructor Detail |
public KWIC()
| Method Detail |
public PropertyChangeSupport getPCS()
PropertyChangeSuppport object that notifies
upon modification.
public void addPhrase(String s)
public void addPhrase(kwic.Phrase p)
Word in the Phrase, add the Word
to the association.
Use reduction to forceAssoc(Word, Phrase).
public void deletePhrase(kwic.Phrase p)
Phrase, delete the association between
the word and the phrase.
Use reduction to dropAssoc(Word, Phrase).
public void forceAssoc(kwic.Word w,
kwic.Phrase p)
Word and Phrase
public void dropAssoc(kwic.Word w,
kwic.Phrase p)
Word and Phrase, if any
public Iterator getPhrases(kwic.Word w)
Phrase associated with
the specified Word.
public void deleteWord(kwic.Word w)
public Iterator getWords()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||