|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--kwic.Word
Represents the original and matching forms of a word. You must
implement Object.hashCode() correctly as well as
Object.equals(Object) for this to work.
| Constructor Summary | |
Word(String w)
Use the supplied String and a DefaultWordFilter filter. |
|
Word(String word,
kwic.WordCanonical wc)
|
|
| Method Summary | |
boolean |
equals(Object o)
You must implement this right, see header note |
String |
getMatchWord()
Returns the form of this word that should be used for matching |
String |
getOriginalWord()
Returns the original form of this word |
int |
hashCode()
You must implement this right, see header note |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Word(String word,
kwic.WordCanonical wc)
public Word(String w)
String and a DefaultWordFilter filter.
For full credit, a new DefaultWordFilter should not be
constructed for each Word using that filter. The trick
is to use a
static variable to avoid constructing superfluous
DefaultWordFilters.
| Method Detail |
public String getMatchWord()
public String getOriginalWord()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||