|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.dict.DictionaryEntry<C>
C - the type of object stored in the dictionarypublic class DictionaryEntry<C>
A DictionaryEntry provides a phrase as a string, an
object-based category for the phrase, and a double-valued score.
Equality for dictionary entries involves equality of the
phrase and category components; dictionaries should not contain
entries with the same phrase and category and different scores.
| Constructor Summary | |
|---|---|
DictionaryEntry(String phrase,
C category)
Construct a dictionary entry with the specified phrase and category, with count and score set to 1. |
|
DictionaryEntry(String phrase,
C category,
double score)
Construct a dictionary entry with the specified phrase, category and score, with a count of zero. |
|
DictionaryEntry(String phrase,
C category,
int count)
Construct a dictionary entry with the specified phrase, category and count, with the score set to the count value. |
|
DictionaryEntry(String phrase,
C category,
int count,
double score)
Construct a dictionary entry with the specified phrase, category, count and score. |
|
| Method Summary | |
|---|---|
C |
category()
Returns the category for this dictionary entry. |
void |
compileTo(ObjectOutput objOut)
Compiles this dictionary entry to the specified object output. |
int |
count()
Returns the count for this dictionary entry. |
boolean |
equals(Object that)
Returns true if the specified object is a
dictionary object equal to this one. |
int |
hashCode()
Returns the hash code for this entry. |
String |
phrase()
Returns the phrase for this dictionary entry. |
double |
score()
Returns the score for this dictionary entry. |
String |
toString()
Returns a string-based representation of this entry. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DictionaryEntry(String phrase,
C category,
int count,
double score)
phrase - Phrase for the constructed entry.category - Category for the constructed entry.count - Count for the constructed entry.score - Score for the constructed entry.
public DictionaryEntry(String phrase,
C category,
double score)
phrase - Phrase for the constructed entry.category - Category for the constructed entry.score - Score for the constructed entry.
public DictionaryEntry(String phrase,
C category,
int count)
phrase - Phrase for the constructed entry.category - Category for the constructed entry.count - Count for the constructed entry.
public DictionaryEntry(String phrase,
C category)
1.
phrase - Phrase for the constructed entry.category - Category for the constructed entry.| Method Detail |
|---|
public String phrase()
public C category()
public double score()
score in interface Scoredpublic int count()
public String toString()
toString in class Objectpublic boolean equals(Object that)
true if the specified object is a
dictionary object equal to this one. Equality is
defined in terms of equality of phrases, categories,
counts and scores; all must be equal for entries
to be equal. Equality is defined consistently with
hashCode().
equals in class Objectthat - Object to compare with this entry.
true if the sepcified object is equal to
this entry.public int hashCode()
equals(Object).
hashCode in class Object
public void compileTo(ObjectOutput objOut)
throws IOException
compileTo in interface CompilableobjOut - Output to which object is written.
IOException - If there is an I/O error compiling the
object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||